Skip to content

Custom style for first (second, third, ...) slide #477

Closed Answered by yhatt
jficz asked this question in Q&A
Discussion options

You must be logged in to vote

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

section#1 { /* Invalid */
  color: red;
}

section[id="2"] { /* Valid */
  color: red;
}

section#\33 { /* Valid */
  color: red;
}

Example: https://jsfiddle.net/unvb2rkp/

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@yhatt
Comment options

Answer selected by jficz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants