[IMP][CSS] Improve literals styling (o_code, .sig-*)
This commit is contained in:
parent
5864376199
commit
ddc2014728
@ -99,3 +99,13 @@
|
|||||||
border-left: 1px solid $o-gray-border;
|
border-left: 1px solid $o-gray-border;
|
||||||
border-right: 1px solid $o-gray-border;
|
border-right: 1px solid $o-gray-border;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin o-code {
|
||||||
|
display: inline-block;
|
||||||
|
color: inherit;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
background: $o-literals-bg;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
|
||||||
|
font-weight: $fw_regular;
|
||||||
|
}
|
||||||
|
@ -36,10 +36,6 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dd {
|
|
||||||
margin-left: $margin-s;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This fixes the scroll position on all elements, including refs
|
// This fixes the scroll position on all elements, including refs
|
||||||
:target {
|
:target {
|
||||||
&:before {
|
&:before {
|
||||||
@ -435,12 +431,7 @@ header {
|
|||||||
|
|
||||||
// Literals Styles (ex: https://www.odoo.com/documentation/master/developer/reference/backend/orm.html#fields)
|
// Literals Styles (ex: https://www.odoo.com/documentation/master/developer/reference/backend/orm.html#fields)
|
||||||
.o_code, .sig [class^="sig-"] {
|
.o_code, .sig [class^="sig-"] {
|
||||||
display: inline-block;
|
@include o-code;
|
||||||
color: inherit;
|
|
||||||
overflow-wrap: anywhere;
|
|
||||||
background: $o-literals-bg;
|
|
||||||
font-size: 0.875em;
|
|
||||||
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_code {
|
.o_code {
|
||||||
@ -456,14 +447,64 @@ header {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sig {
|
.sig {
|
||||||
[class^="sig-"]:first-of-type, span[id] + [class^="sig-"]{
|
.sig-prename {
|
||||||
|
padding-left: .3rem;
|
||||||
|
&+ .sig-name {
|
||||||
|
padding-right: .3rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
em.property + .sig-name {
|
||||||
padding-left: .3rem;
|
padding-left: .3rem;
|
||||||
}
|
}
|
||||||
[class^="sig-"]:last-of-type {
|
.sig-paren:last-of-type {
|
||||||
padding-right: .3rem;
|
padding-right: .3rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dl.py, dl.js, dl.o-definition-list {
|
||||||
|
> dd {
|
||||||
|
border-left: 3px solid $o-literals-border;
|
||||||
|
margin-top: -0.075rem;
|
||||||
|
padding-left: $padding-s;
|
||||||
|
padding-top: $padding-xs;
|
||||||
|
}
|
||||||
|
&.class em.property {
|
||||||
|
font-size: $font-size-sm;
|
||||||
|
&:first-child {
|
||||||
|
border-bottom: 3px solid $o-literals-border;
|
||||||
|
}
|
||||||
|
&:not(:first-child) {
|
||||||
|
@include o_code;
|
||||||
|
padding: 0 .3rem;
|
||||||
|
// &:last-of-type {
|
||||||
|
// padding-right: .3rem;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.field-list {
|
||||||
|
@include font-size($font-size-sm);
|
||||||
|
padding: .5rem;
|
||||||
|
border: 1px solid $o-gray-border;
|
||||||
|
@include media-breakpoint-down(lg) {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
> dt {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
padding-left: 0;
|
||||||
|
|
||||||
|
li:not(:last-child) {
|
||||||
|
padding-bottom: $padding-xs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
iframe {
|
iframe {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
@ -657,56 +698,6 @@ header {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.py, dl.js, dl.o-definition-list {
|
|
||||||
> dd {
|
|
||||||
border-left: 3px solid $o-literals-border;
|
|
||||||
margin: 0;
|
|
||||||
padding-left: $padding-s;
|
|
||||||
padding-top: $padding-xs;
|
|
||||||
}
|
|
||||||
&.class em.property {
|
|
||||||
font-size: $font-size-sm;
|
|
||||||
&:first-child {
|
|
||||||
border-bottom: 3px solid $o-literals-border;
|
|
||||||
+ [class^=sig] {
|
|
||||||
padding-left: .3rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:not(:first-child) {
|
|
||||||
@extend .o_code;
|
|
||||||
&:last-of-type {
|
|
||||||
padding-right: .3rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dl.field-list {
|
|
||||||
@include font-size($font-size-sm);
|
|
||||||
padding: .5rem;
|
|
||||||
border: 1px solid $o-gray-border;
|
|
||||||
@include media-breakpoint-down(lg) {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
> dt {
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
> dd {
|
|
||||||
padding-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
list-style: none;
|
|
||||||
padding-left: 0;
|
|
||||||
|
|
||||||
li {
|
|
||||||
padding-bottom: $padding-xs;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Search items highlighted
|
// Search items highlighted
|
||||||
span.highlighted {
|
span.highlighted {
|
||||||
background-color: lighten($warning, 15%);
|
background-color: lighten($warning, 15%);
|
||||||
|
Loading…
Reference in New Issue
Block a user