Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Common React components for designing user interfaces
npm install -D cosmo-ui
This project assumes you are using a module bundler that allows you to require scss files such as webpack.
Any css created by the cosmo-ui components will be compiled into your own bundled css, and you will have the opportunity to overwrite it before it is compiled. As such, you must configure your module bundler to allow scss files to be required. It is recommended that you use webpack 2 with css modules as follows:
const extractSASS = new ExtractTextPlugin('/[name].css')
module.exports = {
module: {
rules: [
{
test: /\.scss$/,
loader: extractSASS.extract(['css-loader?modules&localIdentName=[name]__[local]___[hash:base64:5]', 'postcss-loader', 'sass-loader'])
}
]
},
plugins: [
extractSASS
]
}
The default variables are located at src/styles/_variables.scss. Any of these variables names can be overridden using the following steps:
alias: {
styles: './path/to/my/styles/folder',
}
Now everytime you try to import something from the "styles" folder, webpack will refer to this location.
Inside your styles folder, add a file called _variables.scss.
Inside the variables file, you can now modify the variables as you wish. When you overwrite a variable be sure to remove the !default tag from the end.
This works because behind the scenes each component will attempt to import 2 variable files:
@import "~styles/variables";
@import "../variables";
The first is your custom variables file. The second is the default fallback.
FAQs
Common React components
We found that cosmo-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.