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

chore: pusher for at peter kan se på, ikke ferdig #2417

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 0 additions & 23 deletions packages/ffe-core/scripts/lib/renderLessVarsToCSSProps.js
Original file line number Diff line number Diff line change
@@ -1,23 +0,0 @@
const fs = require('fs').promises;
const less = require('less');

/**
* Takes less variables from a given file and generates a css stylesheet with
* these variables as custom properties on the :root pseudo-class.
*/
module.exports = async inputFile => {
const data = await fs.readFile(inputFile, 'utf8');
const root = await less.parse(data, { filename: inputFile });

const propertyNames = root.rules
.filter(r => r.variable)
.map(n => n.name.slice(1));

const { css } = await less.render(
`@import '${inputFile}';` +
`@props: ${propertyNames.join(', ')};` +
`:root, :host { each(@props, { --@{value}: @@value; }); }`,
);

return css;
};
1 change: 1 addition & 0 deletions packages/ffe-datepicker-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@sb1/ffe-icons-react": "^11.0.14",
"@types/lodash.debounce": "^4.0.9",
"classnames": "^2.3.1",
"date-fns": "^4.1.0",
"lodash.debounce": "^4.0.8",
"uuid": "^9.0.0"
},
Expand Down
Loading
Loading