1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2025-01-18 00:46:47 +01:00

Switched :where back to :is

This commit is contained in:
squidfunk 2021-12-16 20:14:31 +01:00
parent 5a96912cce
commit 8787449ddd
24 changed files with 70 additions and 70 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -34,7 +34,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.f7951f6f.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.8e8281cd.min.css' | url }}">
{% if config.theme.palette %} {% if config.theme.palette %}
{% set palette = config.theme.palette %} {% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.e6a45f82.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.e6a45f82.min.css' | url }}">

View File

@ -84,7 +84,7 @@ kbd {
} }
// Default spacing // Default spacing
:where(ul, ol, dl, figure, blockquote, pre) { :is(ul, ol, dl, figure, blockquote, pre) {
margin: 1em 0; margin: 1em 0;
} }
@ -129,7 +129,7 @@ kbd {
} }
// Headline on level 5-6 // Headline on level 5-6
:where(h5, h6) { :is(h5, h6) {
margin: px2em(16px, 12.8px) 0; margin: px2em(16px, 12.8px) 0;
color: var(--md-default-fg-color--light); color: var(--md-default-fg-color--light);
font-weight: 700; font-weight: 700;
@ -161,7 +161,7 @@ kbd {
} }
// Text link on focus/hover // Text link on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);
} }
@ -173,7 +173,7 @@ kbd {
} }
// Code block // Code block
:where(code, pre, kbd) { :is(code, pre, kbd) {
color: var(--md-code-fg-color); color: var(--md-code-fg-color);
direction: ltr; direction: ltr;
@ -200,7 +200,7 @@ kbd {
} }
// Code block in headline // Code block in headline
:where(h1, h2, h3, h4, h5, h6) code { :is(h1, h2, h3, h4, h5, h6) code {
margin: initial; margin: initial;
padding: initial; padding: initial;
background-color: transparent; background-color: transparent;
@ -290,7 +290,7 @@ kbd {
position: relative; position: relative;
// Tooltip // Tooltip
&[title]:where(:focus, :hover)::after { &[title]:is(:focus, :hover)::after {
position: absolute; position: absolute;
inset-inline-start: 0; inset-inline-start: 0;
display: inline-block; display: inline-block;
@ -315,7 +315,7 @@ kbd {
} }
// Superscript and subscript // Superscript and subscript
:where(sup, sub) { :is(sup, sub) {
margin-inline-start: px2em(1px, 12.8px); margin-inline-start: px2em(1px, 12.8px);
} }
@ -332,7 +332,7 @@ kbd {
} }
// Unordered and ordered list // Unordered and ordered list
:where(ul, ol) { :is(ul, ol) {
margin-inline-start: px2em(10px); margin-inline-start: px2em(10px);
padding: 0; padding: 0;
@ -357,7 +357,7 @@ kbd {
margin-inline-start: px2em(20px); margin-inline-start: px2em(20px);
// Adjust spacing // Adjust spacing
:where(p, blockquote) { :is(p, blockquote) {
margin: 0.5em 0; margin: 0.5em 0;
} }
@ -367,7 +367,7 @@ kbd {
} }
// Nested list // Nested list
:where(ul, ol) { :is(ul, ol) {
margin-block: 0.5em; margin-block: 0.5em;
margin-inline-start: px2em(10px); margin-inline-start: px2em(10px);
} }
@ -381,7 +381,7 @@ kbd {
} }
// Image or icon // Image or icon
:where(img, svg) { :is(img, svg) {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
@ -458,7 +458,7 @@ kbd {
} }
// Elements in table heading and cell // Elements in table heading and cell
:where(th, td) > * { :is(th, td) > * {
// Adjust spacing on first child // Adjust spacing on first child
&:first-child { &:first-child {
@ -472,7 +472,7 @@ kbd {
} }
// Table heading and cell // Table heading and cell
:where(th, td):not([align]) { :is(th, td):not([align]) {
text-align: left; text-align: left;
// Adjust for right-to-left languages // Adjust for right-to-left languages

View File

@ -62,7 +62,7 @@ $admonitions: (
// Admonition - note that all styles also apply to details tags, which are // Admonition - note that all styles also apply to details tags, which are
// rendered as collapsible admonitions with summary elements as titles. // rendered as collapsible admonitions with summary elements as titles.
:where(.admonition, details) { :is(.admonition, details) {
display: flow-root; display: flow-root;
margin: px2em(20px, 12.8px) 0; margin: px2em(20px, 12.8px) 0;
padding: 0 px2rem(12px); padding: 0 px2rem(12px);
@ -87,7 +87,7 @@ $admonitions: (
} }
// Adjust vertical spacing for nested admonitions // Adjust vertical spacing for nested admonitions
:where(.admonition, details) { :is(.admonition, details) {
margin-top: 1em; margin-top: 1em;
margin-bottom: 1em; margin-bottom: 1em;
} }
@ -162,12 +162,12 @@ $admonitions: (
} }
// Admonition flavour // Admonition flavour
.md-typeset :where(.admonition, details):where(#{$flavours}) { .md-typeset :is(.admonition, details):is(#{$flavours}) {
border-color: $tint; border-color: $tint;
} }
// Admonition flavour title // Admonition flavour title
.md-typeset :where(#{$flavours}) > :is(.admonition-title, summary) { .md-typeset :is(#{$flavours}) > :is(.admonition-title, summary) {
background-color: color.adjust($tint, $alpha: -0.9); background-color: color.adjust($tint, $alpha: -0.9);
border-color: $tint; border-color: $tint;

View File

@ -61,7 +61,7 @@
} }
// Show backreferences on footnote hover/target // Show backreferences on footnote hover/target
&:where(:hover, :target) .footnote-backref { &:is(:hover, :target) .footnote-backref {
transform: translateX(0); transform: translateX(0);
opacity: 1; opacity: 1;
} }

View File

@ -44,7 +44,7 @@
} }
// Show headerlinks on parent hover // Show headerlinks on parent hover
:where(:hover, :target) > .headerlink, :is(:hover, :target) > .headerlink,
.headerlink:focus { .headerlink:focus {
opacity: 1; opacity: 1;
transition: transition:
@ -54,7 +54,7 @@
// Adjust color on parent target or focus/hover // Adjust color on parent target or focus/hover
:target > .headerlink, :target > .headerlink,
.headerlink:where(:focus, :hover) { .headerlink:is(:focus, :hover) {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);
} }
@ -81,7 +81,7 @@
} }
// Adjust scroll offset for headlines of level 1-3 // Adjust scroll offset for headlines of level 1-3
:where(h1, h2, h3):target { :is(h1, h2, h3):target {
--md-scroll-offset: #{px2rem(4px)}; --md-scroll-offset: #{px2rem(4px)};
} }

View File

@ -28,7 +28,7 @@
.md-typeset { .md-typeset {
// Deletion, addition or comment // Deletion, addition or comment
:where(del, ins, .comment).critic { :is(del, ins, .comment).critic {
box-decoration-break: clone; box-decoration-break: clone;
} }

View File

@ -103,7 +103,7 @@
} }
// Hide native details marker - Safari (iOS and macOS) does not seem to // Hide native details marker - Safari (iOS and macOS) does not seem to
// like :where() on details elements, so just go with a selector list. // like :is() on details elements, so just go with a selector list.
&::marker, &::marker,
&::-webkit-details-marker { &::-webkit-details-marker {
display: none; display: none;

View File

@ -28,7 +28,7 @@
.md-typeset { .md-typeset {
// Emoji and icon container // Emoji and icon container
:where(.emojione, .twemoji, .gemoji) { :is(.emojione, .twemoji, .gemoji) {
display: inline-flex; display: inline-flex;
height: px2em(18px); height: px2em(18px);
vertical-align: text-top; vertical-align: text-top;

View File

@ -29,7 +29,7 @@
// .o = Operator // .o = Operator
// .ow = Operator, word // .ow = Operator, word
:where(.o, .ow) { :is(.o, .ow) {
color: var(--md-code-hl-operator-color); color: var(--md-code-hl-operator-color);
} }
@ -46,7 +46,7 @@
// .si = Literal, string interpol // .si = Literal, string interpol
// .s1 = Literal, string single // .s1 = Literal, string single
// .ss = Literal, string symbol // .ss = Literal, string symbol
:where(.cpf, .l, .s, .sb, .sc, .s2, .si, .s1, .ss) { :is(.cpf, .l, .s, .sb, .sc, .s2, .si, .s1, .ss) {
color: var(--md-code-hl-string-color); color: var(--md-code-hl-string-color);
} }
@ -55,7 +55,7 @@
// .sh = Literal, string heredoc // .sh = Literal, string heredoc
// .sr = Literal, string regex // .sr = Literal, string regex
// .sx = Literal, string other // .sx = Literal, string other
:where(.cp, .se, .sh, .sr, .sx) { :is(.cp, .se, .sh, .sr, .sx) {
color: var(--md-code-hl-special-color); color: var(--md-code-hl-special-color);
} }
@ -66,7 +66,7 @@
// .mi = Number, integer // .mi = Number, integer
// .il = Number, integer long // .il = Number, integer long
// .mo = Number, octal // .mo = Number, octal
:where(.m, .mb, .mf, .mh, .mi, .il, .mo) { :is(.m, .mb, .mf, .mh, .mi, .il, .mo) {
color: var(--md-code-hl-number-color); color: var(--md-code-hl-number-color);
} }
@ -76,20 +76,20 @@
// .kp = Keyword, pseudo // .kp = Keyword, pseudo
// .kr = Keyword, reserved // .kr = Keyword, reserved
// .kt = Keyword, type // .kt = Keyword, type
:where(.k, .kd, .kn, .kp, .kr, .kt) { :is(.k, .kd, .kn, .kp, .kr, .kt) {
color: var(--md-code-hl-keyword-color); color: var(--md-code-hl-keyword-color);
} }
// .kc = Keyword, constant // .kc = Keyword, constant
// .n = Name // .n = Name
:where(.kc, .n) { :is(.kc, .n) {
color: var(--md-code-hl-name-color); color: var(--md-code-hl-name-color);
} }
// .no = Name, constant // .no = Name, constant
// .nb = Name, builtin // .nb = Name, builtin
// .bp = Name, builtin pseudo // .bp = Name, builtin pseudo
:where(.no, .nb, .bp) { :is(.no, .nb, .bp) {
color: var(--md-code-hl-constant-color); color: var(--md-code-hl-constant-color);
} }
@ -97,7 +97,7 @@
// .ne = Name, exception // .ne = Name, exception
// .nf = Name, function // .nf = Name, function
// .nn = Name, namespace // .nn = Name, namespace
:where(.nc, .ne, .nf, .nn) { :is(.nc, .ne, .nf, .nn) {
color: var(--md-code-hl-function-color); color: var(--md-code-hl-function-color);
} }
@ -105,7 +105,7 @@
// .ni = Name, entity // .ni = Name, entity
// .nl = Name, label // .nl = Name, label
// .nt = Name, tag // .nt = Name, tag
:where(.nd, .ni, .nl, .nt) { :is(.nd, .ni, .nl, .nt) {
color: var(--md-code-hl-keyword-color); color: var(--md-code-hl-keyword-color);
} }
@ -115,7 +115,7 @@
// .ch = Comment, shebang // .ch = Comment, shebang
// .cs = Comment, special // .cs = Comment, special
// .sd = Literal, string doc // .sd = Literal, string doc
:where(.c, .cm, .c1, .ch, .cs, .sd) { :is(.c, .cm, .c1, .ch, .cs, .sd) {
color: var(--md-code-hl-comment-color); color: var(--md-code-hl-comment-color);
} }
@ -124,7 +124,7 @@
// .vc = Variable, class // .vc = Variable, class
// .vg = Variable, global // .vg = Variable, global
// .vi = Variable, instance // .vi = Variable, instance
:where(.na, .nv, .vc, .vg, .vi) { :is(.na, .nv, .vc, .vg, .vi) {
color: var(--md-code-hl-variable-color); color: var(--md-code-hl-variable-color);
} }
@ -136,13 +136,13 @@
// .gs = Generic, strong // .gs = Generic, strong
// .gu = Generic, subheading // .gu = Generic, subheading
// .gt = Generic, traceback // .gt = Generic, traceback
:where(.ge, .gr, .gh, .go, .gp, .gs, .gu, .gt) { :is(.ge, .gr, .gh, .go, .gp, .gs, .gu, .gt) {
color: var(--md-code-hl-generic-color); color: var(--md-code-hl-generic-color);
} }
// .gd = Diff, delete // .gd = Diff, delete
// .gi = Diff, insert // .gi = Diff, insert
:where(.gd, .gi) { :is(.gd, .gi) {
margin: 0 px2em(-2px); margin: 0 px2em(-2px);
padding: 0 px2em(2px); padding: 0 px2em(2px);
border-radius: px2rem(2px); border-radius: px2rem(2px);
@ -222,7 +222,7 @@
// Set table elements to block layout, because otherwise the whole flexbox // Set table elements to block layout, because otherwise the whole flexbox
// hacking won't work correctly // hacking won't work correctly
:where(tbody, td) { :is(tbody, td) {
display: block; display: block;
padding: 0; padding: 0;
} }

View File

@ -31,7 +31,7 @@
.keys { .keys {
// Keyboard key icon // Keyboard key icon
kbd:where(::before, ::after) { kbd:is(::before, ::after) {
position: relative; position: relative;
margin: 0; margin: 0;
color: inherit; color: inherit;

View File

@ -93,7 +93,7 @@
} }
// Code block on focus/hover // Code block on focus/hover
&:where(:focus, :hover) code { &:is(:focus, :hover) code {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);
background-color: var(--md-accent-fg-color--transparent); background-color: var(--md-accent-fg-color--transparent);
} }

View File

@ -57,7 +57,7 @@
transition: opacity 250ms; transition: opacity 250ms;
// Footer link on focus/hover // Footer link on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
opacity: 0.7; opacity: 0.7;
} }
@ -135,7 +135,7 @@
color: var(--md-footer-fg-color--light); color: var(--md-footer-fg-color--light);
// Text link on focus/hover // Text link on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
color: var(--md-footer-fg-color); color: var(--md-footer-fg-color);
} }
} }

View File

@ -49,7 +49,7 @@
} }
// Button on focus/hover // Button on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
color: var(--md-accent-bg-color); color: var(--md-accent-bg-color);
background-color: var(--md-accent-fg-color); background-color: var(--md-accent-fg-color);
border-color: var(--md-accent-fg-color); border-color: var(--md-accent-fg-color);
@ -70,7 +70,7 @@
box-shadow 250ms; box-shadow 250ms;
// Input on focus/hover // Input on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
border-bottom-color: var(--md-accent-fg-color); border-bottom-color: var(--md-accent-fg-color);
box-shadow: var(--md-shadow-z2); box-shadow: var(--md-shadow-z2);
} }

View File

@ -108,7 +108,7 @@
} }
// Image or icon // Image or icon
:where(img, svg) { :is(img, svg) {
display: block; display: block;
width: px2rem(24px); width: px2rem(24px);
height: px2rem(24px); height: px2rem(24px);

View File

@ -60,7 +60,7 @@
&.md-logo { &.md-logo {
// Image or icon // Image or icon
:where(img, svg) { :is(img, svg) {
display: block; display: block;
width: px2rem(48px); width: px2rem(48px);
height: px2rem(48px); height: px2rem(48px);
@ -181,7 +181,7 @@
&--primary { &--primary {
// Navigation title and item // Navigation title and item
:where(.md-nav__title, .md-nav__item) { :is(.md-nav__title, .md-nav__item) {
font-size: px2rem(16px); font-size: px2rem(16px);
line-height: 1.5; line-height: 1.5;
} }
@ -269,7 +269,7 @@
color: var(--md-typeset-a-color); color: var(--md-typeset-a-color);
// Navigation link on focus/hover // Navigation link on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);
} }
} }
@ -475,7 +475,7 @@
} }
// Show nested navigation when toggle is active or indeterminate // Show nested navigation when toggle is active or indeterminate
&__toggle:where(:checked, :indeterminate) ~ & { &__toggle:is(:checked, :indeterminate) ~ & {
display: block; display: block;
} }

View File

@ -549,7 +549,7 @@
scroll-snap-align: start; scroll-snap-align: start;
// Search result link on focus/hover // Search result link on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
background-color: var(--md-accent-fg-color--transparent); background-color: var(--md-accent-fg-color--transparent);
} }
@ -578,7 +578,7 @@
} }
// Search result more link on focus/hover // Search result more link on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);
background-color: var(--md-accent-fg-color--transparent); background-color: var(--md-accent-fg-color--transparent);
} }

View File

@ -48,7 +48,7 @@
max-height 0ms 500ms; max-height 0ms 500ms;
// Selection bubble on parent focus/hover // Selection bubble on parent focus/hover
.md-select:where(:focus-within, :hover) & { .md-select:is(:focus-within, :hover) & {
max-height: px2rem(200px); max-height: px2rem(200px);
transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0);
opacity: 1; opacity: 1;
@ -103,7 +103,7 @@
scroll-snap-align: start; scroll-snap-align: start;
// Link on focus/hover // Link on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);
} }

View File

@ -80,7 +80,7 @@
// Active link and link on focus/hover // Active link and link on focus/hover
&--active, &--active,
&:where(:focus, :hover) { &:is(:focus, :hover) {
color: inherit; color: inherit;
opacity: 1; opacity: 1;
} }

View File

@ -201,7 +201,7 @@
} }
// Annotation marker on focus/hover // Annotation marker on focus/hover
:where(:focus-within, :hover) > & { :is(:focus-within, :hover) > & {
background-color: var(--md-accent-fg-color); background-color: var(--md-accent-fg-color);
} }
@ -243,7 +243,7 @@
} }
// Annotation index on focus/hover // Annotation index on focus/hover
:where(:focus-within, :hover) > & { :is(:focus-within, :hover) > & {
color: var(--md-accent-bg-color); color: var(--md-accent-bg-color);
} }

View File

@ -68,7 +68,7 @@
} }
// Back-to-top button on focus/hover // Back-to-top button on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
color: var(--md-accent-bg-color); color: var(--md-accent-bg-color);
background-color: var(--md-accent-fg-color); background-color: var(--md-accent-fg-color);
} }

View File

@ -95,7 +95,7 @@
scroll-snap-type: y mandatory; scroll-snap-type: y mandatory;
// Version selection list on parent focus/hover // Version selection list on parent focus/hover
.md-version:where(:focus-within, :hover) & { .md-version:is(:focus-within, :hover) & {
max-height: px2rem(200px); max-height: px2rem(200px);
opacity: 1; opacity: 1;
transition: transition:
@ -137,7 +137,7 @@
scroll-snap-align: start; scroll-snap-align: start;
// Link on focus/hover // Link on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);
} }