Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7634)

Unified Diff: chrome/browser/resources/web_dev_style/css_checker.py

Issue 9958101: [WebUI] Fix rest of CSS style nits in misc. dirs so I can turn on CSS checker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/tracing/tracing_controller.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/web_dev_style/css_checker.py
diff --git a/chrome/browser/resources/web_dev_style/css_checker.py b/chrome/browser/resources/web_dev_style/css_checker.py
index ffcea291886a52e71801668b37b63f7125998ed0..90b803a90a7a6222343e6dd0a9c9429f70c7e466 100644
--- a/chrome/browser/resources/web_dev_style/css_checker.py
+++ b/chrome/browser/resources/web_dev_style/css_checker.py
@@ -121,9 +121,9 @@ class CSSChecker(object):
return ' (replace with #%s)' % (h[0] + h[2] + h[4])
hsl = r'hsl\([^\)]*(?:[, ]|(?<=\())(?:0?\.?)?0%'
- zeros = (r'[^0-9]0(?:\.0?)?'
- r'(?:px|em|%|in|cm|mm|pc|pt|ex|deg|g?rad|m?s|k?hz)'
- r'(?!\s*\{)')
+ zeros = (r'(?:^|\D)'
+ r'(?:\.0|0(?:\.0?|px|em|%|in|cm|mm|pc|pt|ex|deg|g?rad|m?s|k?hz))'
+ r'(?:\D|$)(?!\s*\{)')
def zero_length_values(line):
return (re.search(zeros, line) and not re.search(hsl, line))
« no previous file with comments | « chrome/browser/resources/tracing/tracing_controller.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698