QScintilla/Lexers/LexerCSS.py

changeset 6874
5a3a39442711
parent 6645
ad476851d7e0
equal deleted inserted replaced
6873:47804e8cde27 6874:5a3a39442711
31 self.commentString = "#" 31 self.commentString = "#"
32 self.streamCommentString = { 32 self.streamCommentString = {
33 'start': '/* ', 33 'start': '/* ',
34 'end': ' */' 34 'end': ' */'
35 } 35 }
36
37 self.keywordSetDescriptions = [
38 self.tr("CSS1 Properties"),
39 self.tr("Pseudo-Classes"),
40 self.tr("CSS2 Properties"),
41 self.tr("CSS3 Properties"),
42 self.tr("Pseudo-Elements"),
43 self.tr("Browser-Specific CSS Properties"),
44 self.tr("Browser-Specific Pseudo-Classes"),
45 self.tr("Browser-Specific Pseudo-Elements"),
46 ]
36 47
37 def initProperties(self): 48 def initProperties(self):
38 """ 49 """
39 Public slot to initialize the properties. 50 Public slot to initialize the properties.
40 """ 51 """
74 Public method to get the default keywords. 85 Public method to get the default keywords.
75 86
76 @param kwSet number of the keyword set (integer) 87 @param kwSet number of the keyword set (integer)
77 @return string giving the keywords (string) or None 88 @return string giving the keywords (string) or None
78 """ 89 """
90 if kwSet == 1:
91 return (
92 "color background-color background-image background-repeat"
93 " background-attachment background-position background"
94 " font-family font-style font-variant font-weight font-size"
95 " font word-spacing letter-spacing text-decoration"
96 " vertical-align text-transform text-align text-indent"
97 " line-height margin-top margin-right margin-bottom"
98 " margin-left margin padding-top padding-right padding-bottom"
99 " padding-left padding border-top-width border-right-width"
100 " border-bottom-width border-left-width border-width"
101 " border-top border-right border-bottom border-left border"
102 " border-color border-style width height float clear display"
103 " white-space list-style-type list-style-image"
104 " list-style-position list-style"
105 )
106
107 if kwSet == 2:
108 return (
109 "link active visited first-child focus hover lang left"
110 " right first empty enabled disabled checked not root target"
111 " only-child last-child nth-child nth-last-child first-of-type"
112 " last-of-type nth-of-type nth-last-of-type only-of-type valid"
113 " invalid required optional first-letter first-line before"
114 " after"
115 )
116
117 if kwSet == 3:
118 return (
119 "border-top-color border-right-color border-bottom-color"
120 " border-left-color border-color border-top-style"
121 " border-right-style border-bottom-style border-left-style"
122 " border-style top right bottom left position z-index"
123 " direction unicode-bidi min-width max-width min-height"
124 " max-height overflow clip visibility content quotes"
125 " counter-reset counter-increment marker-offset size marks"
126 " page-break-before page-break-after page-break-inside page"
127 " orphans widows font-stretch font-size-adjust unicode-range"
128 " units-per-em src panose-1 stemv stemh slope cap-height"
129 " x-height ascent descent widths bbox definition-src baseline"
130 " centerline mathline topline text-shadow caption-side"
131 " table-layout border-collapse border-spacing empty-cells"
132 " speak-header cursor outline outline-width outline-style"
133 " outline-color volume speak pause-before pause-after pause"
134 " cue-before cue-after cue play-during azimuth elevation"
135 " speech-rate voice-family pitch pitch-range stress richness"
136 " speak-punctuation speak-numeral"
137 )
138
139 if kwSet == 4:
140 return (
141 "background-size border-radius border-top-right-radius"
142 " border-bottom-right-radius border-bottom-left-radius"
143 " border-top-left-radius box-shadow columns column-width"
144 " column-count column-rule column-gap column-rule-color"
145 " column-rule-style column-rule-width resize opacity word-wrap"
146 )
147
148 if kwSet == 5:
149 return (
150 "first-letter first-line before after selection"
151 )
152
153 if kwSet == 6:
154 return (
155 "^-moz- ^-webkit- ^-o- ^-ms- filter"
156 )
157
158 if kwSet == 7:
159 return (
160 "indeterminate default ^-moz- ^-webkit- ^-o- ^-ms-"
161 )
162
163 if kwSet == 8:
164 return (
165 "selection ^-moz- ^-webkit- ^-o- ^-ms-"
166 )
167
79 return QsciLexerCSS.keywords(self, kwSet) 168 return QsciLexerCSS.keywords(self, kwSet)

eric ide

mercurial