-
Hi, I'd like to be able to set a background image for the first slide in any deck that uses my theme (and in extension style any slide explicitly based on its absolute position in the deck alone). This is somewhat similar to marp-team/marpit#181 and the solution mentioned there works (so long as I add an explicit class to the first slide) but since the slide is perfectly identified by it's ID ( section#1 {
background-image: url("path/to/file.jpg");
} But it doesn't. If I replace the selector with Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
By CSS spec, ID selector section#1 { /* Invalid */
color: red;
}
section[id="2"] { /* Valid */
color: red;
}
section#\33 { /* Valid */
color: red;
} Example: https://jsfiddle.net/unvb2rkp/ |
Beta Was this translation helpful? Give feedback.
-
Ah, thanks, didn't know that. |
Beta Was this translation helpful? Give feedback.
By CSS spec, ID selector
#
cannot start with a number without escaping.https://css-tricks.com/ids-cannot-start-with-a-number/
https://www.w3.org/TR/CSS21/syndata.html#characters:~:text=they%20cannot%20start%20with%20a%20digit
Example: https://jsfiddle.net/unvb2rkp/