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

Replaced rems with pixels or variables (part 2)
This commit is contained in:
Torkel Ödegaard 2019-03-22 12:30:06 +01:00 committed by GitHub
commit a0d2e5861d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 66 additions and 83 deletions

View File

@ -23,7 +23,7 @@ code {
code.code--small {
font-size: $font-size-xs;
padding: 0.2rem;
padding: $space-xxs;
margin: 0 2px;
}

View File

@ -106,7 +106,7 @@ h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 0.5rem;
margin-bottom: $space-sm;
}
// Reset margins on paragraphs
@ -115,7 +115,7 @@ h6 {
// bottom margin to use `rem` units instead of `em`.
p {
margin-top: 0;
margin-bottom: 1rem;
margin-bottom: $space-md;
}
// Abbreviations and acronyms
@ -125,7 +125,7 @@ abbr[title] {
}
address {
margin-bottom: 1rem;
margin-bottom: $space-md;
font-style: normal;
line-height: inherit;
}
@ -134,7 +134,7 @@ ol,
ul,
dl {
margin-top: 0;
margin-bottom: 0rem;
margin-bottom: 0;
}
ol ol,
@ -149,12 +149,12 @@ dt {
}
dd {
margin-bottom: 0.5rem;
margin-bottom: $space-sm;
margin-left: 0; // Undo browser default
}
blockquote {
margin: 0 0 1rem;
margin: 0 0 $space-md;
}
//
@ -183,7 +183,7 @@ pre {
// Remove browser default top margin
margin-top: 0;
// Reset browser default of `1em` to use `rem`s
margin-bottom: 1rem;
margin-bottom: $space-md;
}
//
@ -193,7 +193,7 @@ pre {
figure {
// Normalize adds `margin` to `figure`s as browsers apply it inconsistently.
// We reset that to create a better flow in-page.
margin: 0 0 1rem;
margin: 0 0 $space-md;
}
//
@ -314,8 +314,8 @@ legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: 1.5rem;
margin-bottom: $space-sm;
font-size: $space-lg;
line-height: inherit;
// border: 0;
}

View File

@ -62,13 +62,6 @@
font-size: 11px;
padding: 2px 6px;
}
&--alert {
padding: 0.5rem 1rem;
.card-item-name a {
font-size: $font-size-h5;
}
}
}
.card-item-body {
@ -147,15 +140,10 @@
.card-item-figure {
margin: 0 $space-md $space-md 0;
height: 6rem;
height: 80px;
img {
width: 6rem;
}
.fa,
.icon-gf,
.gicon {
font-size: 3.5rem;
width: 80px;
}
}

View File

@ -1,13 +1,13 @@
.gf-code-editor {
min-height: 2.6rem;
min-width: 20rem;
min-height: 36px;
min-width: 280px;
flex-grow: 1;
margin-right: 0.25rem;
margin-right: $space-xs;
&.ace_editor {
@include font-family-monospace();
font-size: 1rem;
min-height: 3.6rem; // Include space for horizontal scrollbar
font-size: $font-size-md;
min-height: 50px; // Include space for horizontal scrollbar
@include border-radius($input-border-radius-sm);
border: $border-width solid $input-border-color;
@ -20,7 +20,7 @@
.ace_editor.ace_autocomplete {
@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
// is used for overriding styles with the same CSS specificity.
@ -62,11 +62,11 @@ $doc-font-size: $font-size-sm;
color: $popover-help-color;
background-image: none;
border: 1px solid $dropdownBorder;
padding: 0.5rem 1rem;
padding: $space-sm $space-md;
hr {
background-color: $popover-help-color;
margin: 0.5rem 0rem;
margin: $space-sm 0;
}
code {

View File

@ -55,7 +55,7 @@
position: unset !important;
width: 100% !important;
transform: translate(0px, 0px) !important;
margin-bottom: 1rem;
margin-bottom: $space-md;
}
}

View File

@ -5,7 +5,7 @@
}
.search-results {
margin-top: 2rem;
margin-top: $space-xl;
}
.search-results-filter-row {

View File

@ -60,7 +60,7 @@
color: $text-muted;
font-style: italic;
position: relative;
top: -1.5rem;
top: -$space-lg;
}
.dashboard-settings__nav-item {

View File

@ -66,8 +66,8 @@
}
.divider {
height: 0.1rem;
margin: 0.5rem 0; // 8px 1px
height: 1px;
margin: $space-sm 0; // 8px 1px
overflow: hidden;
background-color: $dropdownDividerTop;
border-bottom: 1px solid $dropdownDividerBottom;
@ -314,7 +314,7 @@
&::before {
font-family: FontAwesome;
width: 2rem;
width: 28px;
display: inline-block;
text-align: center;
content: '\f11c';

View File

@ -1,10 +1,9 @@
.grafana-info-box {
position: relative;
padding: 1.5rem;
padding: $space-lg;
background-color: $empty-list-cta-bg;
margin-bottom: 2rem;
border-top: 3px solid $info-box-border-color;
margin-bottom: $spacer;
margin-bottom: $space-md;
margin-right: $space-xs;
box-shadow: $card-shadow;
flex-grow: 1;

View File

@ -122,7 +122,7 @@
}
.modal-content-confirm-text {
margin-bottom: 2rem;
margin-bottom: $space-xl;
span {
text-align: center;
}
@ -143,7 +143,7 @@
.share-modal-big-icon {
margin-bottom: 10px;
margin-right: 2rem;
margin-right: $space-xl;
.fa,
.icon-gf {
font-size: 50px;

View File

@ -66,10 +66,6 @@
padding-left: 6px;
}
&--search {
padding: 1rem 1.5rem 0.75rem 1.5rem;
}
.gicon {
top: -2px;
position: relative;

View File

@ -3,7 +3,7 @@
}
.section {
margin-right: 3rem;
margin-right: 42px;
vertical-align: top;
display: inline-block;
}

View File

@ -42,7 +42,7 @@
}
input[type='text'].tight-form-func-param {
font-size: 0.875rem;
font-size: $font-size-sm;
background: transparent;
border: none;
margin: 0;
@ -87,7 +87,7 @@ input[type='text'].tight-form-func-param {
.rst-unknown.rst-directive {
font-family: monospace;
margin-bottom: 1rem;
margin-bottom: $space-md;
}
.rst-interpreted_text {
@ -96,8 +96,8 @@ input[type='text'].tight-form-func-param {
}
.rst-bullet-list {
padding-left: 1.5rem;
margin-bottom: 1rem;
padding-left: $space-lg;
margin-bottom: $space-md;
}
.rst-paragraph:last-child {
@ -105,7 +105,7 @@ input[type='text'].tight-form-func-param {
}
.drop-element.drop-popover.drop-function-def .drop-content {
max-width: 30rem;
max-width: 416px;
}
.rst-literal-block .rst-text {

View File

@ -17,7 +17,7 @@
text-align: left;
color: $text-muted;
width: 99%;
padding: 0.38rem 1rem;
padding: $space-sm $space-md;
}
.shortcut-table-keys {
@ -31,7 +31,7 @@
.shortcut-table-key {
display: inline-block;
text-align: center;
margin-right: 0.3rem;
margin-right: $space-xs;
padding: 3px 5px;
font: 11px Consolas, 'Liberation Mono', Menlo, Courier, monospace;
line-height: 10px;

View File

@ -97,7 +97,7 @@
}
.page-heading {
font-size: 1.25rem;
font-size: $font-size-h4;
margin-top: 0;
margin-bottom: $spacer * 0.7;
}

View File

@ -23,24 +23,24 @@
.graph-box {
width: 62%;
padding: 2rem 1rem;
padding: $space-xl $space-md;
}
.info-box {
width: 38%;
padding: 2rem 1rem 2rem;
padding: $space-xl $space-md;
}
.graph-percentage {
padding: 0 0 1.5rem;
padding: 0 0 18px;
}
.image-box {
padding: 0.5rem;
padding: $space-sm;
}
.left-margin {
padding: 0 0 0 5rem;
padding: 0 0 0 64px;
}
.current-box {
@ -54,7 +54,7 @@
.current-text {
color: $blue;
font-weight: bold;
line-height: 1rem;
line-height: 14px;
}
.error-link {
@ -63,14 +63,14 @@
.error-minus {
color: #7eb26d;
padding: 0 0.5rem;
line-height: 1.5rem;
padding: 0 $space-sm;
line-height: 21px;
}
.graph-percentage p {
text-align: right;
margin: 0;
line-height: 1rem;
line-height: 14px;
}
.graph-text {

View File

@ -43,11 +43,11 @@ select:-webkit-autofill:focus {
flex-direction: column;
width: 100%;
align-items: center;
margin-bottom: 1rem;
margin-bottom: $space-md;
}
.login-form {
margin-bottom: 1rem;
margin-bottom: $space-md;
width: 100%;
}
@ -69,13 +69,13 @@ select:-webkit-autofill:focus {
align-items: center;
justify-content: space-between;
width: 100%;
margin-top: 0.5rem;
margin-top: $space-sm;
&--right {
justify-content: flex-end;
& .btn {
margin-left: 1rem;
margin-left: $space-md;
}
}
& .btn-inverse {
@ -90,7 +90,7 @@ select:-webkit-autofill:focus {
}
.login-button-forgot-password {
padding-top: 1rem;
padding-top: $space-md;
}
.login-text {
@ -117,7 +117,7 @@ select:-webkit-autofill:focus {
align-items: center;
justify-content: center;
flex-grow: 0;
padding-top: 2rem;
padding-top: $space-xl;
.logo-icon {
width: 70px;
@ -150,7 +150,7 @@ select:-webkit-autofill:focus {
.login-inner-box {
text-align: center;
padding: 2rem;
padding: $space-xl;
display: flex;
flex-direction: column;
align-items: center;
@ -177,7 +177,7 @@ select:-webkit-autofill:focus {
}
.login-change-password-info {
padding-bottom: 1.5rem;
padding-bottom: $space-lg;
& h5 {
text-align: left;
@ -229,7 +229,7 @@ select:-webkit-autofill:focus {
.login-divider {
float: left;
width: 100%;
margin: 0 25% 1rem 25%;
margin: 0 25% $space-md 25%;
display: flex;
justify-content: space-between;
@ -251,7 +251,7 @@ select:-webkit-autofill:focus {
align-items: center;
justify-content: flex-end;
width: 100%;
margin-top: 1rem;
margin-top: $space-md;
}
.login-signup-title {
@ -262,7 +262,7 @@ select:-webkit-autofill:focus {
.login-btn {
width: 100%;
margin: 0 0 1rem;
margin: 0 0 $space-md;
}
.signup-page-background {
@ -307,7 +307,7 @@ select:-webkit-autofill:focus {
@include media-breakpoint-up(sm) {
.login-branding {
padding: 1rem;
padding: $space-md;
.logo-icon {
width: 80px;
@ -329,7 +329,7 @@ select:-webkit-autofill:focus {
.login-branding {
width: 45%;
padding: 2rem;
padding: $space-xl;
flex-grow: 1;
border-right: 1px solid $login-border;
@ -340,7 +340,7 @@ select:-webkit-autofill:focus {
.login-inner-box {
width: 55%;
padding: 1rem 4rem;
padding: $space-md 56px;
}
.login-button-group {

View File

@ -104,7 +104,7 @@
.playlist-available-list {
td {
line-height: 2rem;
line-height: 28px;
max-width: 335px;
white-space: nowrap;
text-overflow: ellipsis;

View File

@ -17,6 +17,6 @@
.signup__password-strength {
position: absolute;
margin-left: 9rem;
width: 194px;
margin-left: 122px;
width: 192px;
}