You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
405 B
JavaScript

Prism.languages.css.selector = {
pattern: /[^\{\}\s][^\{\}]*(?=\s*\{)/g,
inside: {
'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/g,
'pseudo-class': /:[-\w]+(?:\(.*\))?/g,
'class': /\.[-:\.\w]+/g,
'id': /#[-:\.\w]+/g
}
};
Prism.languages.insertBefore('css', 'function', {
'hexcode': /#[\da-f]{3,6}/gi,
'entity': /\\[\da-f]{1,8}/gi,
'number': /[\d%\.]+/g
});