annotate nanorc.d/css.nanorc @ 109:2ee232a821c2

Improve CSS highlighting * Remove an old HTML tag that never gets used and clashes elsewhere in CSS * Add hyphens to allowed class characters
author IBBoard <dev@ibboard.co.uk>
date Sat, 28 Apr 2018 16:05:51 +0100
parents f2d500466492
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
104
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 syntax "css" "\.css$"
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 comment "/*|*/"
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 # Style rules
109
2ee232a821c2 Improve CSS highlighting
IBBoard <dev@ibboard.co.uk>
parents: 104
diff changeset
5 color brightblue "\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdi|bdo|bgsound|big|blink|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|content|data|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|element|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i|iframe|image|img|input|ins|isindex|kbd|keygen|label|legend|li|link|listing|main|map|mark|marquee|menu|menuitem|meta|meter|multicol|nav|nextid|nobr|noembed|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|plaintext|pre|progress|q|rp|rt|rtc|ruby|s|samp|script|section|select|slot|source|spacer|span|strike|strong|sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr|xmp)\b"
104
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 color brightblue "::?(active|any|any-link|checked|default|defined|dir\([^\)]+\)|disabled|empty|enabled|first|first-child|first-of-type|fullscreen|focus|focus-visible|host|host\([^\)]+\)|host-context\([^\)]+\)|hover|indeterminate|in-range|invalid|lang\([^\)]+\)|last-child|last-of-type|left|link|not\([^\)]+\)|nth-child\([^\)]+\)|nth-last-child\([^\)]+\)|nth-last-of-type\([^\)]+\)|nth-of-type\([^\)]+\)|only-child|only-of-type|optional|out-of-range|read-only|read-write|required|right|root|scope|target|valid|visited)"
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 color brightcyan "#[a-zA-Z][a-zA-Z0-9_]+"
109
2ee232a821c2 Improve CSS highlighting
IBBoard <dev@ibboard.co.uk>
parents: 104
diff changeset
8 color cyan "\.([a-zA-Z0-9_-]|\\[0-9]+)+"
104
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 # Strings.
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 color yellow ""((\\")?(\.|[^"])*[^\\])?"" "'((\\')?(\.|[^'])*[^\\])?'"
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 # Colours and measurements
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 color yellow "#([a-fA-F0-9]{3}){1,2}"
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 color yellow "-?[0-9]+(\.[0-9]+)?(em|ex|pt|px|%)?"
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 # Reset headings
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 color brightblue "h[1-6]"
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 # @-functions
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 color magenta "@font-face" "@media \(.*\)"
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 # Comments
f2d500466492 Add initial CSS syntax highlighting
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 color green start="/\*" end="\*/"