Commit a0d2e586 by Torkel Ödegaard Committed by GitHub

Merge pull request #16136 from grafana/rem-removal-2

Replaced rems with pixels or variables (part 2)
parents 31dc3cfc 85bfb1db
...@@ -23,7 +23,7 @@ code { ...@@ -23,7 +23,7 @@ code {
code.code--small { code.code--small {
font-size: $font-size-xs; font-size: $font-size-xs;
padding: 0.2rem; padding: $space-xxs;
margin: 0 2px; margin: 0 2px;
} }
......
...@@ -106,7 +106,7 @@ h4, ...@@ -106,7 +106,7 @@ h4,
h5, h5,
h6 { h6 {
margin-top: 0; margin-top: 0;
margin-bottom: 0.5rem; margin-bottom: $space-sm;
} }
// Reset margins on paragraphs // Reset margins on paragraphs
...@@ -115,7 +115,7 @@ h6 { ...@@ -115,7 +115,7 @@ h6 {
// bottom margin to use `rem` units instead of `em`. // bottom margin to use `rem` units instead of `em`.
p { p {
margin-top: 0; margin-top: 0;
margin-bottom: 1rem; margin-bottom: $space-md;
} }
// Abbreviations and acronyms // Abbreviations and acronyms
...@@ -125,7 +125,7 @@ abbr[title] { ...@@ -125,7 +125,7 @@ abbr[title] {
} }
address { address {
margin-bottom: 1rem; margin-bottom: $space-md;
font-style: normal; font-style: normal;
line-height: inherit; line-height: inherit;
} }
...@@ -134,7 +134,7 @@ ol, ...@@ -134,7 +134,7 @@ ol,
ul, ul,
dl { dl {
margin-top: 0; margin-top: 0;
margin-bottom: 0rem; margin-bottom: 0;
} }
ol ol, ol ol,
...@@ -149,12 +149,12 @@ dt { ...@@ -149,12 +149,12 @@ dt {
} }
dd { dd {
margin-bottom: 0.5rem; margin-bottom: $space-sm;
margin-left: 0; // Undo browser default margin-left: 0; // Undo browser default
} }
blockquote { blockquote {
margin: 0 0 1rem; margin: 0 0 $space-md;
} }
// //
...@@ -183,7 +183,7 @@ pre { ...@@ -183,7 +183,7 @@ pre {
// Remove browser default top margin // Remove browser default top margin
margin-top: 0; margin-top: 0;
// Reset browser default of `1em` to use `rem`s // Reset browser default of `1em` to use `rem`s
margin-bottom: 1rem; margin-bottom: $space-md;
} }
// //
...@@ -193,7 +193,7 @@ pre { ...@@ -193,7 +193,7 @@ pre {
figure { figure {
// Normalize adds `margin` to `figure`s as browsers apply it inconsistently. // Normalize adds `margin` to `figure`s as browsers apply it inconsistently.
// We reset that to create a better flow in-page. // We reset that to create a better flow in-page.
margin: 0 0 1rem; margin: 0 0 $space-md;
} }
// //
...@@ -314,8 +314,8 @@ legend { ...@@ -314,8 +314,8 @@ legend {
display: block; display: block;
width: 100%; width: 100%;
padding: 0; padding: 0;
margin-bottom: 0.5rem; margin-bottom: $space-sm;
font-size: 1.5rem; font-size: $space-lg;
line-height: inherit; line-height: inherit;
// border: 0; // border: 0;
} }
......
...@@ -62,13 +62,6 @@ ...@@ -62,13 +62,6 @@
font-size: 11px; font-size: 11px;
padding: 2px 6px; padding: 2px 6px;
} }
&--alert {
padding: 0.5rem 1rem;
.card-item-name a {
font-size: $font-size-h5;
}
}
} }
.card-item-body { .card-item-body {
...@@ -147,15 +140,10 @@ ...@@ -147,15 +140,10 @@
.card-item-figure { .card-item-figure {
margin: 0 $space-md $space-md 0; margin: 0 $space-md $space-md 0;
height: 6rem; height: 80px;
img { img {
width: 6rem; width: 80px;
}
.fa,
.icon-gf,
.gicon {
font-size: 3.5rem;
} }
} }
......
.gf-code-editor { .gf-code-editor {
min-height: 2.6rem; min-height: 36px;
min-width: 20rem; min-width: 280px;
flex-grow: 1; flex-grow: 1;
margin-right: 0.25rem; margin-right: $space-xs;
&.ace_editor { &.ace_editor {
@include font-family-monospace(); @include font-family-monospace();
font-size: 1rem; font-size: $font-size-md;
min-height: 3.6rem; // Include space for horizontal scrollbar min-height: 50px; // Include space for horizontal scrollbar
@include border-radius($input-border-radius-sm); @include border-radius($input-border-radius-sm);
border: $border-width solid $input-border-color; border: $border-width solid $input-border-color;
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
.ace_editor.ace_autocomplete { .ace_editor.ace_autocomplete {
@include font-family-monospace(); @include font-family-monospace();
font-size: 1rem; font-size: $font-size-md;
// Ace editor adds <style> tag at the end of <head>, after grafana.css, so !important // Ace editor adds <style> tag at the end of <head>, after grafana.css, so !important
// is used for overriding styles with the same CSS specificity. // is used for overriding styles with the same CSS specificity.
...@@ -62,11 +62,11 @@ $doc-font-size: $font-size-sm; ...@@ -62,11 +62,11 @@ $doc-font-size: $font-size-sm;
color: $popover-help-color; color: $popover-help-color;
background-image: none; background-image: none;
border: 1px solid $dropdownBorder; border: 1px solid $dropdownBorder;
padding: 0.5rem 1rem; padding: $space-sm $space-md;
hr { hr {
background-color: $popover-help-color; background-color: $popover-help-color;
margin: 0.5rem 0rem; margin: $space-sm 0;
} }
code { code {
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
position: unset !important; position: unset !important;
width: 100% !important; width: 100% !important;
transform: translate(0px, 0px) !important; transform: translate(0px, 0px) !important;
margin-bottom: 1rem; margin-bottom: $space-md;
} }
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
} }
.search-results { .search-results {
margin-top: 2rem; margin-top: $space-xl;
} }
.search-results-filter-row { .search-results-filter-row {
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
color: $text-muted; color: $text-muted;
font-style: italic; font-style: italic;
position: relative; position: relative;
top: -1.5rem; top: -$space-lg;
} }
.dashboard-settings__nav-item { .dashboard-settings__nav-item {
......
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
} }
.divider { .divider {
height: 0.1rem; height: 1px;
margin: 0.5rem 0; // 8px 1px margin: $space-sm 0; // 8px 1px
overflow: hidden; overflow: hidden;
background-color: $dropdownDividerTop; background-color: $dropdownDividerTop;
border-bottom: 1px solid $dropdownDividerBottom; border-bottom: 1px solid $dropdownDividerBottom;
...@@ -314,7 +314,7 @@ ...@@ -314,7 +314,7 @@
&::before { &::before {
font-family: FontAwesome; font-family: FontAwesome;
width: 2rem; width: 28px;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
content: '\f11c'; content: '\f11c';
......
.grafana-info-box { .grafana-info-box {
position: relative; position: relative;
padding: 1.5rem; padding: $space-lg;
background-color: $empty-list-cta-bg; background-color: $empty-list-cta-bg;
margin-bottom: 2rem;
border-top: 3px solid $info-box-border-color; border-top: 3px solid $info-box-border-color;
margin-bottom: $spacer; margin-bottom: $space-md;
margin-right: $space-xs; margin-right: $space-xs;
box-shadow: $card-shadow; box-shadow: $card-shadow;
flex-grow: 1; flex-grow: 1;
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
} }
.modal-content-confirm-text { .modal-content-confirm-text {
margin-bottom: 2rem; margin-bottom: $space-xl;
span { span {
text-align: center; text-align: center;
} }
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
.share-modal-big-icon { .share-modal-big-icon {
margin-bottom: 10px; margin-bottom: 10px;
margin-right: 2rem; margin-right: $space-xl;
.fa, .fa,
.icon-gf { .icon-gf {
font-size: 50px; font-size: 50px;
......
...@@ -66,10 +66,6 @@ ...@@ -66,10 +66,6 @@
padding-left: 6px; padding-left: 6px;
} }
&--search {
padding: 1rem 1.5rem 0.75rem 1.5rem;
}
.gicon { .gicon {
top: -2px; top: -2px;
position: relative; position: relative;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
} }
.section { .section {
margin-right: 3rem; margin-right: 42px;
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
} }
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
} }
input[type='text'].tight-form-func-param { input[type='text'].tight-form-func-param {
font-size: 0.875rem; font-size: $font-size-sm;
background: transparent; background: transparent;
border: none; border: none;
margin: 0; margin: 0;
...@@ -87,7 +87,7 @@ input[type='text'].tight-form-func-param { ...@@ -87,7 +87,7 @@ input[type='text'].tight-form-func-param {
.rst-unknown.rst-directive { .rst-unknown.rst-directive {
font-family: monospace; font-family: monospace;
margin-bottom: 1rem; margin-bottom: $space-md;
} }
.rst-interpreted_text { .rst-interpreted_text {
...@@ -96,8 +96,8 @@ input[type='text'].tight-form-func-param { ...@@ -96,8 +96,8 @@ input[type='text'].tight-form-func-param {
} }
.rst-bullet-list { .rst-bullet-list {
padding-left: 1.5rem; padding-left: $space-lg;
margin-bottom: 1rem; margin-bottom: $space-md;
} }
.rst-paragraph:last-child { .rst-paragraph:last-child {
...@@ -105,7 +105,7 @@ input[type='text'].tight-form-func-param { ...@@ -105,7 +105,7 @@ input[type='text'].tight-form-func-param {
} }
.drop-element.drop-popover.drop-function-def .drop-content { .drop-element.drop-popover.drop-function-def .drop-content {
max-width: 30rem; max-width: 416px;
} }
.rst-literal-block .rst-text { .rst-literal-block .rst-text {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
text-align: left; text-align: left;
color: $text-muted; color: $text-muted;
width: 99%; width: 99%;
padding: 0.38rem 1rem; padding: $space-sm $space-md;
} }
.shortcut-table-keys { .shortcut-table-keys {
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
.shortcut-table-key { .shortcut-table-key {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
margin-right: 0.3rem; margin-right: $space-xs;
padding: 3px 5px; padding: 3px 5px;
font: 11px Consolas, 'Liberation Mono', Menlo, Courier, monospace; font: 11px Consolas, 'Liberation Mono', Menlo, Courier, monospace;
line-height: 10px; line-height: 10px;
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
} }
.page-heading { .page-heading {
font-size: 1.25rem; font-size: $font-size-h4;
margin-top: 0; margin-top: 0;
margin-bottom: $spacer * 0.7; margin-bottom: $spacer * 0.7;
} }
......
...@@ -23,24 +23,24 @@ ...@@ -23,24 +23,24 @@
.graph-box { .graph-box {
width: 62%; width: 62%;
padding: 2rem 1rem; padding: $space-xl $space-md;
} }
.info-box { .info-box {
width: 38%; width: 38%;
padding: 2rem 1rem 2rem; padding: $space-xl $space-md;
} }
.graph-percentage { .graph-percentage {
padding: 0 0 1.5rem; padding: 0 0 18px;
} }
.image-box { .image-box {
padding: 0.5rem; padding: $space-sm;
} }
.left-margin { .left-margin {
padding: 0 0 0 5rem; padding: 0 0 0 64px;
} }
.current-box { .current-box {
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
.current-text { .current-text {
color: $blue; color: $blue;
font-weight: bold; font-weight: bold;
line-height: 1rem; line-height: 14px;
} }
.error-link { .error-link {
...@@ -63,14 +63,14 @@ ...@@ -63,14 +63,14 @@
.error-minus { .error-minus {
color: #7eb26d; color: #7eb26d;
padding: 0 0.5rem; padding: 0 $space-sm;
line-height: 1.5rem; line-height: 21px;
} }
.graph-percentage p { .graph-percentage p {
text-align: right; text-align: right;
margin: 0; margin: 0;
line-height: 1rem; line-height: 14px;
} }
.graph-text { .graph-text {
......
...@@ -43,11 +43,11 @@ select:-webkit-autofill:focus { ...@@ -43,11 +43,11 @@ select:-webkit-autofill:focus {
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
align-items: center; align-items: center;
margin-bottom: 1rem; margin-bottom: $space-md;
} }
.login-form { .login-form {
margin-bottom: 1rem; margin-bottom: $space-md;
width: 100%; width: 100%;
} }
...@@ -69,13 +69,13 @@ select:-webkit-autofill:focus { ...@@ -69,13 +69,13 @@ select:-webkit-autofill:focus {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
margin-top: 0.5rem; margin-top: $space-sm;
&--right { &--right {
justify-content: flex-end; justify-content: flex-end;
& .btn { & .btn {
margin-left: 1rem; margin-left: $space-md;
} }
} }
& .btn-inverse { & .btn-inverse {
...@@ -90,7 +90,7 @@ select:-webkit-autofill:focus { ...@@ -90,7 +90,7 @@ select:-webkit-autofill:focus {
} }
.login-button-forgot-password { .login-button-forgot-password {
padding-top: 1rem; padding-top: $space-md;
} }
.login-text { .login-text {
...@@ -117,7 +117,7 @@ select:-webkit-autofill:focus { ...@@ -117,7 +117,7 @@ select:-webkit-autofill:focus {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-grow: 0; flex-grow: 0;
padding-top: 2rem; padding-top: $space-xl;
.logo-icon { .logo-icon {
width: 70px; width: 70px;
...@@ -150,7 +150,7 @@ select:-webkit-autofill:focus { ...@@ -150,7 +150,7 @@ select:-webkit-autofill:focus {
.login-inner-box { .login-inner-box {
text-align: center; text-align: center;
padding: 2rem; padding: $space-xl;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
...@@ -177,7 +177,7 @@ select:-webkit-autofill:focus { ...@@ -177,7 +177,7 @@ select:-webkit-autofill:focus {
} }
.login-change-password-info { .login-change-password-info {
padding-bottom: 1.5rem; padding-bottom: $space-lg;
& h5 { & h5 {
text-align: left; text-align: left;
...@@ -229,7 +229,7 @@ select:-webkit-autofill:focus { ...@@ -229,7 +229,7 @@ select:-webkit-autofill:focus {
.login-divider { .login-divider {
float: left; float: left;
width: 100%; width: 100%;
margin: 0 25% 1rem 25%; margin: 0 25% $space-md 25%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -251,7 +251,7 @@ select:-webkit-autofill:focus { ...@@ -251,7 +251,7 @@ select:-webkit-autofill:focus {
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
width: 100%; width: 100%;
margin-top: 1rem; margin-top: $space-md;
} }
.login-signup-title { .login-signup-title {
...@@ -262,7 +262,7 @@ select:-webkit-autofill:focus { ...@@ -262,7 +262,7 @@ select:-webkit-autofill:focus {
.login-btn { .login-btn {
width: 100%; width: 100%;
margin: 0 0 1rem; margin: 0 0 $space-md;
} }
.signup-page-background { .signup-page-background {
...@@ -307,7 +307,7 @@ select:-webkit-autofill:focus { ...@@ -307,7 +307,7 @@ select:-webkit-autofill:focus {
@include media-breakpoint-up(sm) { @include media-breakpoint-up(sm) {
.login-branding { .login-branding {
padding: 1rem; padding: $space-md;
.logo-icon { .logo-icon {
width: 80px; width: 80px;
...@@ -329,7 +329,7 @@ select:-webkit-autofill:focus { ...@@ -329,7 +329,7 @@ select:-webkit-autofill:focus {
.login-branding { .login-branding {
width: 45%; width: 45%;
padding: 2rem; padding: $space-xl;
flex-grow: 1; flex-grow: 1;
border-right: 1px solid $login-border; border-right: 1px solid $login-border;
...@@ -340,7 +340,7 @@ select:-webkit-autofill:focus { ...@@ -340,7 +340,7 @@ select:-webkit-autofill:focus {
.login-inner-box { .login-inner-box {
width: 55%; width: 55%;
padding: 1rem 4rem; padding: $space-md 56px;
} }
.login-button-group { .login-button-group {
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
.playlist-available-list { .playlist-available-list {
td { td {
line-height: 2rem; line-height: 28px;
max-width: 335px; max-width: 335px;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
......
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
.signup__password-strength { .signup__password-strength {
position: absolute; position: absolute;
margin-left: 9rem; margin-left: 122px;
width: 194px; width: 192px;
} }
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