Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Masking properties #349

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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