This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .some-class { | |
| font-size: var(--text12); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { coreStyles } from '/some/path/variabless'; | |
| Highcharts.setOptions({ | |
| colors: Object.values(coreStyles.lightTheme.value) | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import 'assets/styles/theme.css'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fontSizes = [10, 12, 14 , ...]; | |
| const coreStyles = { | |
| fontSize: { | |
| variableName: 'text:valueKey', | |
| properties: [{ | |
| prop: 'font-size', | |
| selector: '.text:valueKey' | |
| }], | |
| value: fontSizes.reduce((acc, size) => { | |
| acc[size] = `${size / 16}rem`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const coreStyles = { | |
| fontSize: { | |
| variableName: 'text:valueKey', | |
| properties: [{ | |
| prop: 'font-size', | |
| selector: '.text:valueKey' | |
| }], | |
| value: { | |
| 10: '0.625rem', | |
| 12: '0.75rem', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { VariablessWebpackPlugin } = require('variabless/webpack-plugin'); | |
| module.exports = { | |
| plugins: [ | |
| new VariablessWebpackPlugin({ | |
| watch?: boolean, // listen to changes | |
| srcPath: 'src/variabless.ts', // the variables rules file | |
| outputPath: 'src/assets/styles/theme.css', // generated css file path | |
| }), | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const coreStyles: Record<string, Rule> = { | |
| myVariable: { | |
| value: string | object, | |
| variableName?: string | Resolver, | |
| appendVariablesTo?: string, | |
| properties?: PropertyConfig[], | |
| }, | |
| ... | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title": "[[ someFunc(Hello {{user}}\\, welcome ,...) ]]", | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title": "[[ hasFeatureFlag(newDashboards, has flag, missing flag) ]]", | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { FunctionalTranspiler, TRANSLOCO_TRANSPILER } from '@ngneat/transloco'; | |
| import { FeatureFlagResolver } from './has-feature-flag'; | |
| @NgModule({ | |
| ... | |
| providers: [{ | |
| provide: TRANSLOCO_TRANSPILER, | |
| useClass: FunctionalTranspiler | |
| }, | |
| { |
NewerOlder