提交 2954390e 编写于 作者: P Piotr Bryk

Merge pull request #203 from bryk/global-styles

Global styling framework: streamline variable handling
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// TODO(floreks): Find appropriate place for global color definitions.
$primary: #326de6; $primary: #326de6;
$delicate: #aaa; $delicate: #aaa;
$muted: #888; $muted: #888;
...@@ -20,6 +19,8 @@ $hover-primary: #1254df; ...@@ -20,6 +19,8 @@ $hover-primary: #1254df;
$body: #eee; $body: #eee;
$emphasis: #000; $emphasis: #000;
$content-background: #fff; $content-background: #fff;
// TODO(bryk): Reference angular_material/src/core/style/variables.scss instead of having
// this variable here. // TODO(bryk): Get those variables from Angular Material scss files.
$whiteframe-shadow-z1: 0 2px 5px 0 rgba(0, 0, 0, .26) !default; $layout-breakpoint-lg: 1280px;
$whiteframe-shadow-1dp: 0 1px 3px 0 rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 2px 1px -1px rgba(0, 0, 0, .12);
$baseline-grid: 8px;
...@@ -16,7 +16,7 @@ limitations under the License. ...@@ -16,7 +16,7 @@ limitations under the License.
<md-content class="kd-content"> <md-content class="kd-content">
<md-toolbar class="kd-toolbar"> <md-toolbar class="kd-toolbar">
<div class="md-toolbar-tools"> <div class="md-toolbar-tools kd-toolbar-tools">
<a ui-sref="replicasets"> <a ui-sref="replicasets">
<md-icon md-svg-icon="assets/images/kubernetes-logo.svg" class="kd-toolbar-logo"></md-icon> <md-icon md-svg-icon="assets/images/kubernetes-logo.svg" class="kd-toolbar-logo"></md-icon>
</a> </a>
...@@ -26,5 +26,7 @@ limitations under the License. ...@@ -26,5 +26,7 @@ limitations under the License.
<div flex ui-view="toolbar"></div> <div flex ui-view="toolbar"></div>
</div> </div>
</md-toolbar> </md-toolbar>
<div ng-transclude></div> <div class="kd-app-content-wrapper">
<div ng-transclude class="kd-app-content"></div>
</div>
</md-content> </md-content>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
@import '../../assets/styles/color_variables'; @import '../variables';
.kd-toolbar-logo { .kd-toolbar-logo {
height: 42px; height: 42px;
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
} }
.kd-toolbar { .kd-toolbar {
box-shadow: $whiteframe-shadow-z1; box-shadow: $whiteframe-shadow-1dp;
} }
body { body {
...@@ -32,3 +32,12 @@ body { ...@@ -32,3 +32,12 @@ body {
a { a {
text-decoration: inherit; text-decoration: inherit;
} }
.kd-toolbar-tools,
.kd-app-content-wrapper {
margin: 0 auto;
}
.kd-app-content {
position: relative;
}
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
@import '../../assets/styles/color_variables'; @import '../variables';
.kd-deploy-whiteframe { .kd-deploy-whiteframe {
background: $content-background; background: $content-background;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
@import '../../../assets/styles/color_variables'; @import '../../variables';
.kd-user-help { .kd-user-help {
* { * {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
@import '../../assets/styles/color_variables'; @import '../variables';
$replicasetdetails-sidebar-bg: #fafafa; $replicasetdetails-sidebar-bg: #fafafa;
$replicasetdetails-border: #ddd; $replicasetdetails-border: #ddd;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
@import '../../assets/styles/color_variables'; @import '../variables';
$sortedheader-font-size: 14px; $sortedheader-font-size: 14px;
......
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
@import '../../assets/styles/color_variables'; @import '../variables';
.kd-replicaset-card { .kd-replicaset-card {
width: 400px; margin: $baseline-grid;
width: ($layout-breakpoint-lg - (2 * $baseline-grid) * 2) / 3;
} }
// This override button style to make it look like a link. // This override button style to make it look like a link.
...@@ -43,7 +44,7 @@ ...@@ -43,7 +44,7 @@
} }
.kd-replicaset-card-section { .kd-replicaset-card-section {
margin-top: 1em; margin-top: 2 * $baseline-grid;
} }
.kd-replicaset-card-section-image { .kd-replicaset-card-section-image {
...@@ -53,7 +54,7 @@ ...@@ -53,7 +54,7 @@
} }
.kd-replicaset-card-label { .kd-replicaset-card-label {
margin-right: 1em; margin-right: 2 * $baseline-grid;
} }
.kd-menu-logs-md-menu-item { .kd-menu-logs-md-menu-item {
...@@ -75,5 +76,5 @@ ...@@ -75,5 +76,5 @@
.kd-menu-logs-link-icon { .kd-menu-logs-link-icon {
font-size: 1em; font-size: 1em;
margin-left: 5px; margin-left: $baseline-grid;
} }
...@@ -19,6 +19,6 @@ limitations under the License. ...@@ -19,6 +19,6 @@ limitations under the License.
</md-button> </md-button>
<kd-replica-set-list-container> <kd-replica-set-list-container>
<kd-replica-set-card ng-repeat="replicaSet in ::ctrl.replicaSets" replica-set="::replicaSet"> <kd-replica-set-card ng-repeat="replicaSet in ::ctrl.replicaSets" replica-set="::replicaSet">
</kd-replica-set-card> </kd-replica-set-card>
</kd-replica-set-list-container> </kd-replica-set-list-container>
...@@ -12,10 +12,12 @@ ...@@ -12,10 +12,12 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
@import '../variables';
.md-fab { .md-fab {
&.kd-replicaset-deploy { &.kd-replicaset-deploy {
position: absolute; position: absolute;
right: 5px; right: 0;
top: 28px; top: -56px / 2 - $baseline-grid;
} }
} }
...@@ -17,5 +17,5 @@ ...@@ -17,5 +17,5 @@
align-items: center; align-items: center;
display: flex; display: flex;
flex-flow: column wrap; flex-flow: column wrap;
justify-content: top; justify-content: top;
} }
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
@import '../../assets/styles/color_variables'; @import '../variables';
.kd-content { .kd-content {
background-color: $body; background-color: $body;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册