[IMP][CSS] update literals styles (.o_code, .sig-*)

This commit is contained in:
Elisabeth Dickinson 2022-11-10 16:03:21 +01:00 committed by Antoine Vandevenne (anv)
parent fe894ad110
commit c51edecd28

View File

@ -437,22 +437,19 @@ header {
padding: 0 .3rem; padding: 0 .3rem;
} }
} }
code {
// Markup Styles
.o_code, .sig [class^="sig-"] {
display: inline-block; display: inline-block;
color: inherit; color: inherit;
overflow-wrap: anywhere; overflow-wrap: anywhere;
&:first-of-type:not(span):not(em) { background: $o-gray-bg;
padding-left: .3rem; font-size: 0.875em;
} font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
&:last-of-type:not(em) { }
padding-right: .3rem;
} .o_code {
~ .sig-paren, ~ .sig-param, ~ .optional { padding: 0 .3rem;
@extend code;
+ .sig-paren {
padding: 0 .1rem;
}
}
&.file { &.file {
font-family: $font-family-base; font-family: $font-family-base;
font-weight: $fw_medium; font-weight: $fw_medium;
@ -461,10 +458,14 @@ header {
color: $color-beta-dark; color: $color-beta-dark;
background-color: lighten($color-beta-lightest, 30%); background-color: lighten($color-beta-lightest, 30%);
} }
}
&:not(.file) { .sig {
color: inherit; [class^="sig-"]:first-of-type, span[id] + [class^="sig-"]{
background: darken($doc_code-bg,3%); padding-left: .3rem;
}
[class^="sig-"]:last-of-type {
padding-right: .3rem;
} }
} }
@ -661,12 +662,6 @@ header {
} }
} }
.command {
font-family: var(--bs-font-monospace);
font-weight: $fw_regular;
@extend code;
}
dl.py, dl.js, dl.o-definition-list { dl.py, dl.js, dl.o-definition-list {
> dd { > dd {
border-left: 3px solid $gray-lighter; border-left: 3px solid $gray-lighter;
@ -683,7 +678,7 @@ header {
} }
} }
&:not(:first-child) { &:not(:first-child) {
@extend code; @extend .o_code;
&:last-of-type { &:last-of-type {
padding-right: .3rem; padding-right: .3rem;
} }