Changeset 176699 in webkit
- Timestamp:
- Dec 2, 2014 4:39:34 PM (9 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r176610 r176699 1 2014-12-02 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: CSS Minification breaks some selectors with colons 4 https://bugs.webkit.org/show_bug.cgi?id=139206 5 6 Reviewed by Simon Fraser. 7 8 Do not remove spaces preceeding colons, as they may change the semantics 9 of selectors with colon prefixes (e.g. "a :not(b)"). 10 11 At the same time, we can strip spaces around "!" characters, for example 12 a space is not required before "!important" priority. 13 14 * Scripts/cssmin.py: 15 (cssminify): 16 1 17 2014-12-01 Benjamin Poulain <benjamin@webkit.org> 2 18 -
trunk/Source/WebInspectorUI/Scripts/cssmin.py
r174615 r176699 31 31 (r"\n", ""), # delete new lines 32 32 (r"\s+", " "), # change multiple spaces to one space 33 (r"\s?([;:{},~>])\s?", r"\1"), # delete space where it is not needed 33 (r"\s?([;{},~>!])\s?", r"\1"), # delete space where it is not needed 34 (r":\s", ":"), # delete spaces after colons, but not before. E.g. do not break selectors "a :focus", "b :matches(...)", "c :not(...)" where the leading space is significant 34 35 (r"\s?([-+])(?:\s(?![0-9(]))", r"\1"), # delete whitespace around + and - when not followed by a number or paren. E.g. strip for selector "a + b" but not "calc(a + b)" which requires spaces. 35 36 (r";}", "}") # change ';}' to '}' because the semicolon is not needed
Note: See TracChangeset
for help on using the changeset viewer.