Commit Graph

3 Commits

Author SHA1 Message Date
Ryan Shaw 0fd4cd758a Lint for css that will break RTL
Closes: CORE-1808

these are all the properties that you need to wrap in the sass direction
Helper so they automatically flip for you in RTL

Test plan:
* go to a file that says `float: right;`
* run `yarn stylelint path/to/that/file.scss`
* it should complain about that rule

* change it to `text-align: direction(right);`
* run stylelint again
* it should not complain

Change-Id: I88ff06189b384c2e7fa3d1cd09b273ffb0061160
Reviewed-on: https://gerrit.instructure.com/162840
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-10-17 20:21:25 +00:00
Ryan Shaw 32934befd2 stylelint: shorthand-property-no-redundant-values
this is just the result of running:
`yarn stylelint app/stylesheets --fix`
with the new shorthand-property-no-redundant-values that is in our
.stylelintrc applied

By running this, now we can know that any style declaration that uses a
4 value shorthand really is something that needs to be using
direction-sides or direction-corners so it flips in RTL.

I still need to find a way to disallow that ^ now

Test plan:
* nothing changes, this css is exactly semantically equal to what it
  was before

Change-Id: I2a2883cfa755253fcafc956f44fd3f5dfd141b19
Reviewed-on: https://gerrit.instructure.com/162841
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-08-31 18:48:46 +00:00
Landon Wilkins 903c9a0a66 stylelint, refs SD-1603
test plan:
* add an invalid hex code to a scss file
  e.g. _variables.scss:
  color: #YARRRRRRRR
* run stylelint with: `script/stylelint`
* verify the colored output only returns your introduced error

Change-Id: Ia4f2adef3635f34154d50d61249b952a380208bf
Reviewed-on: https://gerrit.instructure.com/92229
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-10-25 00:21:16 +00:00