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

Adding column rules #389

Merged
merged 3 commits into from
Aug 26, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions src/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,120 @@ module.exports = [
},
/**
==================================================================
COLUMNS
==================================================================
*/
{
'type': 'pattern',
'name': 'Colm',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name property should be an English-readable string that succinctly describes the rule, see other rules for examples

'matcher': 'Colm',
'allowParamToValue': true,
'styles': {
'columns': '$0'
}
},
{
'type': 'pattern',
'name': 'Colmc',
'matcher': 'Colmc',
'styles': {
'column-count': '$0'
}
},
{
'type': 'pattern',
'name': 'Colmf',
'matcher': 'Colmf',
'allowParamToValue': false,
'shorthand': true,
'styles': {
'column-fill': '$0'
},
'arguments': [{
a: 'auto',
b: 'balance'
}]
},
{
'type': 'pattern',
'name': 'Colmg',
'matcher': 'Colmg',
'styles': {
'column-gap': '$0'
}
},
{
'type': 'pattern',
'id': 'Colmr',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need id

'name': 'Colmr',
'allowParamToValue': true,
'styles': {
'column-rule': '$0'
}
},
{
'type': 'pattern',
'name': 'Colmrc',
'matcher': 'Colmrc',
'noParams': false,
'styles': {
'column-rule-color': '$0'
}
},
{
'type': 'pattern',
'name': 'Colmrs',
'matcher': 'Colmrs',
'allowParamToValue': false,
'shorthand': true,
'styles': {
'column-rule-style': '$0'
},
'arguments': [{
'd': 'dotted',
'da': 'dashed',
'do': 'double',
'g': 'groove',
'h': 'hidden',
'i': 'inset',
'n': 'none',
'o': 'outset',
'r': 'ridge',
's': 'solid'
}]
},
{
'type': 'pattern',
'name': 'Colmrw',
'matcher': 'Colmrw',
'styles': {
'column-rule-width': '$0'
}
},
{
'type': 'pattern',
'name': 'Colms',
'matcher': 'Colms',
'allowParamToValue': false,
'shorthand': true,
'styles': {
'column-span': '$0'
},
'arguments': [{
'a': 'all',
'n': 'none'
}]
},
{
'type': 'pattern',
'name': 'Colmw',
'matcher': 'Colmw',
'styles': {
'column-width': '$0'
}
},
/**
==================================================================
CONTAIN
==================================================================
*/
Expand Down