prism-css-extras.js 397 B

123456789101112131415
  1. Prism.languages.css.selector = {
  2. pattern: /[^\{\}\s][^\{\}]*(?=\s*\{)/,
  3. inside: {
  4. 'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
  5. 'pseudo-class': /:[-\w]+(?:\(.*\))?/,
  6. 'class': /\.[-:\.\w]+/,
  7. 'id': /#[-:\.\w]+/
  8. }
  9. };
  10. Prism.languages.insertBefore('css', 'function', {
  11. 'hexcode': /#[\da-f]{3,6}/i,
  12. 'entity': /\\[\da-f]{1,8}/i,
  13. 'number': /[\d%\.]+/
  14. });