[IMP][CSS] Replace margin and padding values with variables

This commit is contained in:
Elisabeth Dickinson 2023-01-02 14:06:16 +01:00 committed by Antoine Vandevenne (anv)
parent 8febda41af
commit e36bd9b924
2 changed files with 13 additions and 12 deletions

View File

@ -177,6 +177,7 @@ $margin-s: $padding-s;
$margin-m: $padding-m; $margin-m: $padding-m;
$margin-l: $padding-l; $margin-l: $padding-l;
$o-icon-margin: .2em;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Components // Components
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View File

@ -31,13 +31,13 @@ body {
content: '#{$i-external-link}'; content: '#{$i-external-link}';
font-family: icomoon, sans-serif !important; font-family: icomoon, sans-serif !important;
@include font-size($font-size-base/1.3); @include font-size($font-size-base/1.3);
margin: 0 .2rem; margin: 0 $o-icon-margin;
} }
} }
} }
dd { dd {
margin-left: 1rem; margin-left: $margin-s;
} }
// This fixes the scroll position on all elements, including refs // This fixes the scroll position on all elements, including refs
@ -525,7 +525,7 @@ header {
align-items: center; align-items: center;
&:before { &:before {
@include o-inline-icon($i-article, 0 .2rem 0 0); @include o-inline-icon($i-article, 0 $o-icon-margin 0 0);
color: $o-gray-light; color: $o-gray-light;
} }
} }
@ -752,7 +752,7 @@ header {
} }
img { img {
margin-bottom: 1rem; margin-bottom: $margin-s;
} }
img:not(.o-no-modal) { img:not(.o-no-modal) {
@ -760,7 +760,7 @@ header {
} }
iframe { iframe {
margin-bottom: 1rem; margin-bottom: $margin-s;
} }
p > img { p > img {
@ -928,7 +928,7 @@ header {
font-weight: $fw_bold; font-weight: $fw_bold;
&:before { &:before {
@include o-inline-icon($i-info, 0 .2rem 0 0, baseline, $font-size-base, inherit); @include o-inline-icon($i-info, 0 $o-icon-margin 0 0, baseline, $font-size-base, inherit);
@include media-breakpoint-down(md) { @include media-breakpoint-down(md) {
display:none; display:none;
} }
@ -1040,7 +1040,7 @@ header {
.accordion-button { .accordion-button {
&::after { &::after {
margin: 0 .2rem 0 0; margin: 0 $o-icon-margin 0 0;
} }
&.collapsed::after { &.collapsed::after {
@ -1051,7 +1051,7 @@ header {
.accordion-body { .accordion-body {
#wrap & { // FIXME: Temporary workaround to take priority over pre-existing rules. #wrap & { // FIXME: Temporary workaround to take priority over pre-existing rules.
> *:first-child { > *:first-child {
margin-top: 1rem; margin-top: $margin-s;
} }
code, div[class^="highlight"] { code, div[class^="highlight"] {
@ -1071,7 +1071,7 @@ header {
.sphinx-tabs { .sphinx-tabs {
padding: 0; padding: 0;
margin-bottom: 1rem; margin-bottom: $margin-s;
div[role="tablist"] { div[role="tablist"] {
border-color: $o-gray-border; border-color: $o-gray-border;
@ -1098,7 +1098,7 @@ header {
color: $o-gray-color; color: $o-gray-color;
border: 0; border: 0;
border-top: solid 1px $o-gray-border; border-top: solid 1px $o-gray-border;
padding: .5rem 1rem; padding: $padding-xs $padding-s;
&:hover { &:hover {
&:not([aria-selected="true"]) { &:not([aria-selected="true"]) {
@ -1141,7 +1141,7 @@ header {
background: $white; background: $white;
color: $o-gray-color; color: $o-gray-color;
border: 1px solid $o-gray-border; border: 1px solid $o-gray-border;
padding: 1rem; padding: $padding-s;
&:focus { &:focus {
outline: none; outline: none;
@ -1172,7 +1172,7 @@ footer {
h4 { h4 {
color: $secondary; color: $secondary;
font-weight: $fw_bold; font-weight: $fw_bold;
margin-bottom: 1.5rem; margin-bottom: $margin-s;
} }
} }