Skip to content

Commit 1506965

Browse files
committed
Merge pull request #284 from mahonnaise/known-properties
known-properties rule cleanup
2 parents c429435 + e91d7ef commit 1506965

File tree

1 file changed

+3
-291
lines changed

1 file changed

+3
-291
lines changed

Diff for: src/rules/known-properties.js

+3-291
Original file line numberDiff line numberDiff line change
@@ -8,308 +8,20 @@ CSSLint.addRule({
88
//rule information
99
id: "known-properties",
1010
name: "Require use of known properties",
11-
desc: "Properties should be known (listed in CSS specification) or be a vendor-prefixed property.",
11+
desc: "Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",
1212
browsers: "All",
1313

1414
//initialization
1515
init: function(parser, reporter){
16-
var rule = this,
17-
properties = {
18-
19-
"alignment-adjust": 1,
20-
"alignment-baseline": 1,
21-
"animation": 1,
22-
"animation-delay": 1,
23-
"animation-direction": 1,
24-
"animation-duration": 1,
25-
"animation-fill-mode": 1,
26-
"animation-iteration-count": 1,
27-
"animation-name": 1,
28-
"animation-play-state": 1,
29-
"animation-timing-function": 1,
30-
"appearance": 1,
31-
"azimuth": 1,
32-
"backface-visibility": 1,
33-
"background": 1,
34-
"background-attachment": 1,
35-
"background-break": 1,
36-
"background-clip": 1,
37-
"background-color": 1,
38-
"background-image": 1,
39-
"background-origin": 1,
40-
"background-position": 1,
41-
"background-repeat": 1,
42-
"background-size": 1,
43-
"baseline-shift": 1,
44-
"binding": 1,
45-
"bleed": 1,
46-
"bookmark-label": 1,
47-
"bookmark-level": 1,
48-
"bookmark-state": 1,
49-
"bookmark-target": 1,
50-
"border": 1,
51-
"border-bottom": 1,
52-
"border-bottom-color": 1,
53-
"border-bottom-left-radius": 1,
54-
"border-bottom-right-radius": 1,
55-
"border-bottom-style": 1,
56-
"border-bottom-width": 1,
57-
"border-collapse": 1,
58-
"border-color": 1,
59-
"border-image": 1,
60-
"border-image-outset": 1,
61-
"border-image-repeat": 1,
62-
"border-image-slice": 1,
63-
"border-image-source": 1,
64-
"border-image-width": 1,
65-
"border-left": 1,
66-
"border-left-color": 1,
67-
"border-left-style": 1,
68-
"border-left-width": 1,
69-
"border-radius": 1,
70-
"border-right": 1,
71-
"border-right-color": 1,
72-
"border-right-style": 1,
73-
"border-right-width": 1,
74-
"border-spacing": 1,
75-
"border-style": 1,
76-
"border-top": 1,
77-
"border-top-color": 1,
78-
"border-top-left-radius": 1,
79-
"border-top-right-radius": 1,
80-
"border-top-style": 1,
81-
"border-top-width": 1,
82-
"border-width": 1,
83-
"bottom": 1,
84-
"box-align": 1,
85-
"box-decoration-break": 1,
86-
"box-direction": 1,
87-
"box-flex": 1,
88-
"box-flex-group": 1,
89-
"box-lines": 1,
90-
"box-ordinal-group": 1,
91-
"box-orient": 1,
92-
"box-pack": 1,
93-
"box-shadow": 1,
94-
"box-sizing": 1,
95-
"break-after": 1,
96-
"break-before": 1,
97-
"break-inside": 1,
98-
"caption-side": 1,
99-
"clear": 1,
100-
"clip": 1,
101-
"color": 1,
102-
"color-profile": 1,
103-
"column-count": 1,
104-
"column-fill": 1,
105-
"column-gap": 1,
106-
"column-rule": 1,
107-
"column-rule-color": 1,
108-
"column-rule-style": 1,
109-
"column-rule-width": 1,
110-
"column-span": 1,
111-
"column-width": 1,
112-
"columns": 1,
113-
"content": 1,
114-
"counter-increment": 1,
115-
"counter-reset": 1,
116-
"crop": 1,
117-
"cue": 1,
118-
"cue-after": 1,
119-
"cue-before": 1,
120-
"cursor": 1,
121-
"direction": 1,
122-
"display": 1,
123-
"dominant-baseline": 1,
124-
"drop-initial-after-adjust": 1,
125-
"drop-initial-after-align": 1,
126-
"drop-initial-before-adjust": 1,
127-
"drop-initial-before-align": 1,
128-
"drop-initial-size": 1,
129-
"drop-initial-value": 1,
130-
"elevation": 1,
131-
"empty-cells": 1,
132-
"fit": 1,
133-
"fit-position": 1,
134-
"float": 1,
135-
"float-offset": 1,
136-
"font": 1,
137-
"font-family": 1,
138-
"font-size": 1,
139-
"font-size-adjust": 1,
140-
"font-stretch": 1,
141-
"font-style": 1,
142-
"font-variant": 1,
143-
"font-weight": 1,
144-
"grid-columns": 1,
145-
"grid-rows": 1,
146-
"hanging-punctuation": 1,
147-
"height": 1,
148-
"hyphenate-after": 1,
149-
"hyphenate-before": 1,
150-
"hyphenate-character": 1,
151-
"hyphenate-lines": 1,
152-
"hyphenate-resource": 1,
153-
"hyphens": 1,
154-
"icon": 1,
155-
"image-orientation": 1,
156-
"image-rendering": 1,
157-
"image-resolution": 1,
158-
"inline-box-align": 1,
159-
"left": 1,
160-
"letter-spacing": 1,
161-
"line-height": 1,
162-
"line-stacking": 1,
163-
"line-stacking-ruby": 1,
164-
"line-stacking-shift": 1,
165-
"line-stacking-strategy": 1,
166-
"list-style": 1,
167-
"list-style-image": 1,
168-
"list-style-position": 1,
169-
"list-style-type": 1,
170-
"margin": 1,
171-
"margin-bottom": 1,
172-
"margin-left": 1,
173-
"margin-right": 1,
174-
"margin-top": 1,
175-
"mark": 1,
176-
"mark-after": 1,
177-
"mark-before": 1,
178-
"marks": 1,
179-
"marquee-direction": 1,
180-
"marquee-play-count": 1,
181-
"marquee-speed": 1,
182-
"marquee-style": 1,
183-
"max-height": 1,
184-
"max-width": 1,
185-
"min-height": 1,
186-
"min-width": 1,
187-
"move-to": 1,
188-
"nav-down": 1,
189-
"nav-index": 1,
190-
"nav-left": 1,
191-
"nav-right": 1,
192-
"nav-up": 1,
193-
"opacity": 1,
194-
"orphans": 1,
195-
"outline": 1,
196-
"outline-color": 1,
197-
"outline-offset": 1,
198-
"outline-style": 1,
199-
"outline-width": 1,
200-
"overflow": 1,
201-
"overflow-style": 1,
202-
"overflow-x": 1,
203-
"overflow-y": 1,
204-
"padding": 1,
205-
"padding-bottom": 1,
206-
"padding-left": 1,
207-
"padding-right": 1,
208-
"padding-top": 1,
209-
"page": 1,
210-
"page-break-after": 1,
211-
"page-break-before": 1,
212-
"page-break-inside": 1,
213-
"page-policy": 1,
214-
"pause": 1,
215-
"pause-after": 1,
216-
"pause-before": 1,
217-
"perspective": 1,
218-
"perspective-origin": 1,
219-
"phonemes": 1,
220-
"pitch": 1,
221-
"pitch-range": 1,
222-
"play-during": 1,
223-
"position": 1,
224-
"presentation-level": 1,
225-
"punctuation-trim": 1,
226-
"quotes": 1,
227-
"rendering-intent": 1,
228-
"resize": 1,
229-
"rest": 1,
230-
"rest-after": 1,
231-
"rest-before": 1,
232-
"richness": 1,
233-
"right": 1,
234-
"rotation": 1,
235-
"rotation-point": 1,
236-
"ruby-align": 1,
237-
"ruby-overhang": 1,
238-
"ruby-position": 1,
239-
"ruby-span": 1,
240-
"size": 1,
241-
"speak": 1,
242-
"speak-header": 1,
243-
"speak-numeral": 1,
244-
"speak-punctuation": 1,
245-
"speech-rate": 1,
246-
"stress": 1,
247-
"string-set": 1,
248-
"table-layout": 1,
249-
"target": 1,
250-
"target-name": 1,
251-
"target-new": 1,
252-
"target-position": 1,
253-
"text-align": 1,
254-
"text-align-last": 1,
255-
"text-decoration": 1,
256-
"text-emphasis": 1,
257-
"text-height": 1,
258-
"text-indent": 1,
259-
"text-justify": 1,
260-
"text-outline": 1,
261-
"text-shadow": 1,
262-
"text-transform": 1,
263-
"text-wrap": 1,
264-
"top": 1,
265-
"transform": 1,
266-
"transform-origin": 1,
267-
"transform-style": 1,
268-
"transition": 1,
269-
"transition-delay": 1,
270-
"transition-duration": 1,
271-
"transition-property": 1,
272-
"transition-timing-function": 1,
273-
"unicode-bidi": 1,
274-
"user-modify": 1,
275-
"user-select": 1,
276-
"vertical-align": 1,
277-
"visibility": 1,
278-
"voice-balance": 1,
279-
"voice-duration": 1,
280-
"voice-family": 1,
281-
"voice-pitch": 1,
282-
"voice-pitch-range": 1,
283-
"voice-rate": 1,
284-
"voice-stress": 1,
285-
"voice-volume": 1,
286-
"volume": 1,
287-
"white-space": 1,
288-
"white-space-collapse": 1,
289-
"widows": 1,
290-
"width": 1,
291-
"word-break": 1,
292-
"word-spacing": 1,
293-
"word-wrap": 1,
294-
"z-index": 1,
295-
296-
//IE
297-
"filter": 1,
298-
"zoom": 1,
299-
300-
//@font-face
301-
"src": 1
302-
};
16+
var rule = this;
30317

30418
parser.addListener("property", function(event){
30519
var name = event.property.text.toLowerCase();
30620

21+
// the check is handled entirely by the parser-lib (https://github.com/nzakas/parser-lib)
30722
if (event.invalid) {
30823
reporter.report(event.invalid.message, event.line, event.col, rule);
30924
}
310-
//if (!properties[name] && name.charAt(0) != "-"){
311-
// reporter.error("Unknown property '" + event.property + "'.", event.line, event.col, rule);
312-
//}
31325

31426
});
31527
}

0 commit comments

Comments
 (0)