Commit 7dc4853e by ijin08

added new variables for spacing, set margins in _cards with new variables

parent 00ce556b
...@@ -17,7 +17,11 @@ $enable-hover-media-query: false !default; ...@@ -17,7 +17,11 @@ $enable-hover-media-query: false !default;
// Control the default styling of most Bootstrap elements by modifying these // Control the default styling of most Bootstrap elements by modifying these
// variables. Mostly focused on spacing. // variables. Mostly focused on spacing.
$spacer: ${theme.spacing.m} !default; $space-xs: ${theme.spacing.xs} !default;
$space-s: ${theme.spacing.s} !default;
$space-m: ${theme.spacing.m} !default;
$space-xl: ${theme.spacing.xl} !default;
$spacer: ${theme.spacing.d} !default;
$spacer-x: $spacer !default; $spacer-x: $spacer !default;
$spacer-y: $spacer !default; $spacer-y: $spacer !default;
$spacers: ( $spacers: (
......
...@@ -43,10 +43,12 @@ const theme: GrafanaThemeCommons = { ...@@ -43,10 +43,12 @@ const theme: GrafanaThemeCommons = {
xl: '1200px', xl: '1200px',
}, },
spacing: { spacing: {
xs: '0', d: '14px',
s: '3px', xs: '4px',
m: '14px', s: '8px',
l: '21px', m: '16px',
l: '24px',
xl: '32px',
gutter: '30px', gutter: '30px',
}, },
border: { border: {
......
...@@ -48,10 +48,12 @@ export interface GrafanaThemeCommons { ...@@ -48,10 +48,12 @@ export interface GrafanaThemeCommons {
}; };
}; };
spacing: { spacing: {
d: string;
xs: string; xs: string;
s: string; s: string;
m: string; m: string;
l: string; l: string;
xl: string;
gutter: string; gutter: string;
}; };
border: { border: {
......
...@@ -20,6 +20,10 @@ $enable-hover-media-query: false !default; ...@@ -20,6 +20,10 @@ $enable-hover-media-query: false !default;
// Control the default styling of most Bootstrap elements by modifying these // Control the default styling of most Bootstrap elements by modifying these
// variables. Mostly focused on spacing. // variables. Mostly focused on spacing.
$space-xs: 4px !default;
$space-s: 8px !default;
$space-m: 16px !default;
$space-xl: 32px !default;
$spacer: 14px !default; $spacer: 14px !default;
$spacer-x: $spacer !default; $spacer-x: $spacer !default;
$spacer-y: $spacer !default; $spacer-y: $spacer !default;
......
.layout-selector { .layout-selector {
@include clearfix(); @include clearfix();
margin-left: $spacer; margin-left: $space-m;
text-align: right; text-align: right;
button { button {
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
color: $text-color-weak; color: $text-color-weak;
box-shadow: $card-shadow; box-shadow: $card-shadow;
border: none; border: none;
padding: 0.5rem; padding: $space-s;
line-height: 1; line-height: 1;
font-size: 130%; font-size: 130%;
float: right; float: right;
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
} }
.card-section { .card-section {
margin-bottom: $spacer * 2; margin-bottom: $space-xl;
} }
.card-list { .card-list {
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
height: 100%; height: 100%;
background: $card-background; background: $card-background;
box-shadow: $card-shadow; box-shadow: $card-shadow;
padding: 1rem; padding: $space-m;
border-radius: 4px; border-radius: 4px;
&:hover { &:hover {
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
} }
.label-tag { .label-tag {
margin-left: 6px; margin-left: $space-s;
font-size: 11px; font-size: 11px;
padding: 2px 6px; padding: 2px 6px;
} }
...@@ -80,15 +80,8 @@ ...@@ -80,15 +80,8 @@
overflow: hidden; overflow: hidden;
} }
.card-item-cog {
font-size: 130%;
position: relative;
top: 1rem;
color: $text-muted;
}
.card-item-header { .card-item-header {
margin-bottom: $spacer; margin-bottom: $space-m;
} }
.card-item-type { .card-item-type {
...@@ -110,7 +103,7 @@ ...@@ -110,7 +103,7 @@
} }
.card-item-label { .card-item-label {
margin-left: 8px; margin-left: $space-s;
} }
.card-item-sub-name { .card-item-sub-name {
...@@ -123,7 +116,7 @@ ...@@ -123,7 +116,7 @@
.card-item-sub-name--header { .card-item-sub-name--header {
color: $text-color-weak; color: $text-color-weak;
text-transform: uppercase; text-transform: uppercase;
margin-bottom: $spacer; margin-bottom: $space-m;
font-size: $font-size-sm; font-size: $font-size-sm;
font-weight: bold; font-weight: bold;
} }
...@@ -136,7 +129,7 @@ ...@@ -136,7 +129,7 @@
.card-item-notice { .card-item-notice {
font-size: $font-size-sm; font-size: $font-size-sm;
display: inline-block; display: inline-block;
margin-left: $spacer; margin-left: $space-m;
} }
.card-item-header-action { .card-item-header-action {
...@@ -145,7 +138,7 @@ ...@@ -145,7 +138,7 @@
.card-item-wrapper { .card-item-wrapper {
width: 100%; width: 100%;
padding: 0 1rem 1rem 0rem; padding: 0 $space-m $space-m 0;
} }
.card-item-wrapper--clickable { .card-item-wrapper--clickable {
...@@ -153,7 +146,7 @@ ...@@ -153,7 +146,7 @@
} }
.card-item-figure { .card-item-figure {
margin: 0 $spacer $spacer 0; margin: 0 $space-m $space-m 0;
height: 6rem; height: 6rem;
img { img {
...@@ -195,7 +188,7 @@ ...@@ -195,7 +188,7 @@
.card-item-wrapper { .card-item-wrapper {
padding: 0; padding: 0;
width: 100%; width: 100%;
margin-bottom: 3px; margin-bottom: $space-xs;
} }
.card-item-wrapper--clickable { .card-item-wrapper--clickable {
...@@ -212,9 +205,9 @@ ...@@ -212,9 +205,9 @@
} }
.card-item-figure { .card-item-figure {
margin: 0 $spacer 0 0; margin: 0 $space-m 0 0;
img { img {
width: 3.5rem; width: 48px;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment