Skip to content

Commit

Permalink
Refactor reference data into groups (#6179)
Browse files Browse the repository at this point in the history
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
  • Loading branch information
jeddy3 and ybiquitous committed Jun 28, 2022
1 parent 0ffb27f commit 12f1141
Show file tree
Hide file tree
Showing 47 changed files with 1,024 additions and 998 deletions.
55 changes: 55 additions & 0 deletions lib/reference/atKeywords.js
@@ -0,0 +1,55 @@
'use strict';

const uniteSets = require('../utils/uniteSets.js');

// https://www.w3.org/TR/css-page-3/#syntax-page-selector
const pageMarginAtKeywords = new Set([
'top-left-corner',
'top-left',
'top-center',
'top-right',
'top-right-corner',
'bottom-left-corner',
'bottom-left',
'bottom-center',
'bottom-right',
'bottom-right-corner',
'left-top',
'left-middle',
'left-bottom',
'right-top',
'right-middle',
'right-bottom',
]);

// https://developer.mozilla.org/en/docs/Web/CSS/At-rule
const atKeywords = uniteSets(pageMarginAtKeywords, [
'annotation',
'apply',
'character-variant',
'charset',
'counter-style',
'custom-media',
'custom-selector',
'document',
'font-face',
'font-feature-values',
'import',
'keyframes',
'layer',
'media',
'namespace',
'nest',
'ornaments',
'page',
'property',
'styleset',
'stylistic',
'supports',
'swash',
'viewport',
]);

module.exports = {
atKeywords,
};
22 changes: 22 additions & 0 deletions lib/reference/functions.js
@@ -0,0 +1,22 @@
'use strict';

const camelCaseFunctions = new Set([
'translateX',
'translateY',
'translateZ',
'scaleX',
'scaleY',
'scaleZ',
'rotateX',
'rotateY',
'rotateZ',
'skewX',
'skewY',
]);

const mathFunctions = new Set(['calc', 'clamp', 'max', 'min']);

module.exports = {
camelCaseFunctions,
mathFunctions,
};

0 comments on commit 12f1141

Please sign in to comment.