styles: Undo calc(x + y) → calc(x - -y) workaround.

The bug this was working around does not affect our current toolchain,
as confirmed by grepping through the minified output.

(Also, this linter rule only matched calc(x + y) with two arguments
and we were already using calc($far_left_gutter_size + $left_col_size
+ 4px).)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-05-27 15:58:41 -07:00
committed by Tim Abbott
parent 7d9d2414ca
commit 30ab261f91
5 changed files with 6 additions and 10 deletions

View File

@@ -498,10 +498,6 @@ bash_rules = RuleList(
css_rules = RuleList(
langs=['css', 'scss'],
rules=[
{'pattern': r'calc\([^+]+\+[^+]+\)',
'description': "Avoid using calc with '+' operator. See #8403 : in CSS.",
'good_lines': ["width: calc(20% - -14px);"],
'bad_lines': ["width: calc(20% + 14px);"]},
{'pattern': r'^[^:]*:\S[^:]*;$',
'description': "Missing whitespace after : in CSS",
'good_lines': ["background-color: white;", "text-size: 16px;"],