source: Dev/branches/rest-dojo-ui/client/dojox/highlight/languages/css.js @ 256

Last change on this file since 256 was 256, checked in by hendrikvanantwerpen, 13 years ago

Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).

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