After digging through the specs some more, I found the CSS spec does allow for backslash (\
) escaping like most languages.
So in my example, the following rule would match:
#some\.id {
color: #f00;
}
More Related Contents:
- Understanding CSS selector priority / specificity
- CSS Pseudo-classes with inline styles
- Why do browsers match CSS selectors from right to left?
- Can I write a CSS selector selecting elements NOT having a certain class or attribute?
- Are class names in CSS selectors case sensitive?
- Is there a CSS selector for the first direct child only?
- Why doesn’t table > tr > td work when using the child selector?
- CSS selector by inline style attribute
- :last-child not working as expected?
- :not(:empty) CSS selector is not working?
- How to exclude particular class name in CSS selector?
- What is the performance impact of the universal selector?
- Why is nth-child selector not working?
- Can a ::before selector be used with a ?
- Is it possible to use CSS vars in CSS3 selectors?
- What is the ::content/::slotted pseudo-element and how does it work?
- CSS Selector “(A or B) and C”?
- Why does the general-sibling combinator allow toggling pseudo-element’s content, but not the adjacent-sibling?
- How can I target a specific column or row in a CSS grid layout?
- How do I select an element that has a certain class?
- Selecting the last element among various nested containers
- Zebra striping a flexbox table with wrapping items
- CSS attribute selector does not work a href
- How to use nth-child for styling with a table with rowspan?
- CSS Selector for No-Children-But-Not-Empty
- Is there a CSS not equals selector?
- Hide element, but show CSS generated content
- How can I select elements in CSS by partial ID value?
- How can I get a specific number child using CSS?
- Why does .class:last-of-type not work as I expect?