source: Dev/trunk/src/client/dojox/highlight/languages/css.js @ 529

Last change on this file since 529 was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 3.2 KB
Line 
1define(["../_base", "./html"], function(dh, html){
2       
3        var dhc = dh.constants;
4        return dh.languages.css = {
5                // summary:
6                //              CSS Language definition file.
7                defaultMode: {
8                        contains: ['id', 'class', 'attr_selector', 'rules', 'comment'],
9                        keywords: html.HTML_TAGS,
10                        lexems: [dhc.IDENT_RE],
11                        illegal: '='
12                },
13                case_insensitive: true,
14                modes: [
15                        {
16                                className: 'id',
17                                begin: '\\#[A-Za-z0-9_-]+', end: '^'
18                        },
19                        {
20                                className: 'class',
21                                begin: '\\.[A-Za-z0-9_-]+', end: '^',
22                                relevance: 0
23                        },
24                        {
25                                className: 'attr_selector',
26                                begin: '\\[', end: '\\]',
27                                illegal: '$'
28                        },
29                        {
30                                className: 'rules',
31                                begin: '{', end: '}',
32                                lexems: ['[A-Za-z-]+'],
33                                keywords: {
34                                        'play-during': 1, 'counter-reset': 1,
35                                        'counter-increment': 1, 'min-height': 1, 'quotes': 1,
36                                        'border-top': 1, 'pitch': 1, 'font': 1, 'pause': 1,
37                                        'list-style-image': 1, 'border-width': 1, 'cue': 1,
38                                        'outline-width': 1, 'border-left': 1, 'elevation': 1,
39                                        'richness': 1, 'speech-rate': 1, 'border-bottom': 1,
40                                        'border-spacing': 1, 'background': 1, 'list-style-type': 1,
41                                        'text-align': 1, 'page-break-inside': 1, 'orphans': 1,
42                                        'page-break-before': 1, 'text-transform': 1,
43                                        'line-height': 1, 'padding-left': 1, 'font-size': 1,
44                                        'right': 1, 'word-spacing': 1, 'padding-top': 1,
45                                        'outline-style': 1, 'bottom': 1, 'content': 1,
46                                        'border-right-style': 1, 'padding-right': 1,
47                                        'border-left-style': 1, 'voice-family': 1,
48                                        'background-color': 1, 'border-bottom-color': 1,
49                                        'outline-color': 1, 'unicode-bidi': 1, 'max-width': 1,
50                                        'font-family': 1, 'caption-side': 1,
51                                        'border-right-width': 1, 'pause-before': 1,
52                                        'border-top-style': 1, 'color': 1, 'border-collapse': 1,
53                                        'border-bottom-width': 1, 'float': 1, 'height': 1,
54                                        'max-height': 1, 'margin-right': 1, 'border-top-width': 1,
55                                        'speak': 1, 'speak-header': 1, 'top': 1, 'cue-before': 1,
56                                        'min-width': 1, 'width': 1, 'font-variant': 1,
57                                        'border-top-color': 1, 'background-position': 1,
58                                        'empty-cells': 1, 'direction': 1, 'border-right': 1,
59                                        'visibility': 1, 'padding': 1, 'border-style': 1,
60                                        'background-attachment': 1, 'overflow': 1,
61                                        'border-bottom-style': 1, 'cursor': 1, 'margin': 1,
62                                        'display': 1, 'border-left-width': 1, 'letter-spacing': 1,
63                                        'vertical-align': 1, 'clip': 1, 'border-color': 1,
64                                        'list-style': 1, 'padding-bottom': 1, 'pause-after': 1,
65                                        'speak-numeral': 1, 'margin-left': 1, 'widows': 1,
66                                        'border': 1, 'font-style': 1, 'border-left-color': 1,
67                                        'pitch-range': 1, 'background-repeat': 1,
68                                        'table-layout': 1, 'margin-bottom': 1,
69                                        'speak-punctuation': 1, 'font-weight': 1,
70                                        'border-right-color': 1, 'page-break-after': 1,
71                                        'position': 1, 'white-space': 1, 'text-indent': 1,
72                                        'background-image': 1, 'volume': 1, 'stress': 1,
73                                        'outline': 1, 'clear': 1, 'z-index': 1,
74                                        'text-decoration': 1, 'margin-top': 1, 'azimuth': 1,
75                                        'cue-after': 1, 'left': 1, 'list-style-position': 1
76                                },
77                                contains: ['comment', 'value']
78                        },
79                        dhc.C_BLOCK_COMMENT_MODE,
80                        {
81                                className: 'value',
82                                begin: ':',
83                                end: ';',
84                                endsWithParent: true,
85                                excludeBegin: true,
86                                excludeEnd: true
87                        }
88                ]
89        };
90});
Note: See TracBrowser for help on using the repository browser.