Skip to content

Commit

Permalink
Add Masking properties (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
stormwarning authored Nov 19, 2023
1 parent 09d9761 commit 3a28977
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .changeset/fuzzy-balloons-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'stylelint-config-recess-order': minor
---

Add Masking properties

- [`mask-border`](https://developer.mozilla.org/en-US/docs/Web/CSS/mask-border) and related longhand properties
- [`mask`](https://developer.mozilla.org/en-US/docs/Web/CSS/mask) and related longhand properties

`mask` was previously included within some SVG-specific properties — it’s been moved above those and below border & outline properties.

`mask-border` properties are sorted above `mask` to highlight the fact that `mask` will reset `mask-border` to its initial value ([as per W3C spec](https://drafts.fxtf.org/css-masking/#the-mask)). I’m not familiar with this properties; if this order is problematic in practice, please file an issue!
22 changes: 21 additions & 1 deletion groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,27 @@ const propertyGroups = [
'-ms-interpolation-mode',
],
},
{
// Masking.
properties: [
'mask-border',
'mask-border-source',
'mask-border-slice',
'mask-border-width',
'mask-border-outset',
'mask-border-repeat',
'mask-border-mode',
'mask',
'mask-image',
'mask-mode',
'mask-repeat',
'mask-position',
'mask-clip',
'mask-origin',
'mask-size',
'mask-composite',
],
},
{
// SVG Presentation Attributes.
properties: [
Expand Down Expand Up @@ -384,7 +405,6 @@ const propertyGroups = [
'marker-start',
'marker-mid',
'marker-end',
'mask',
'shape-rendering',
'stop-color',
'stop-opacity',
Expand Down

0 comments on commit 3a28977

Please sign in to comment.