
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
@oruga-ui/theme-bulma
Advanced tools
npm install @oruga-ui/theme-bulma
or
yarn add @oruga-ui/theme-bulma
import { createApp } from 'vue'
import App from './App.vue'
import Oruga from '@oruga-ui/oruga-next'
import { bulmaConfig } from '@oruga-ui/theme-bulma'
import '@oruga-ui/theme-bulma/dist/bulma.css'
createApp(App)
.use(Oruga, bulmaConfig)
.mount('#app')
Please note, this package can be used without importing any other Oruga styling or theme.
Bulma is a highly customizable CSS framework. From colors to typography, spacing and sizes, forms and layouts, all parts of Bulma can be customized by the user (see Bulma Customization).
Using the following sample code below you don't need import '@oruga-ui/theme-bulma/dist/bulma.css'
but you have to add a custom sass/scss file (like main.scss
) to customize Bulma and the theme variables.
import { createApp } from 'vue'
import App from './App.vue'
import Oruga from '@oruga-ui/oruga-next'
import { bulmaConfig } from '@oruga-ui/theme-bulma'
import './main.scss'
createApp(App)
.use(Oruga, bulmaConfig)
.mount('#app')
Inside your own sass/scss file you need to include Bulma styles and theme styles. To overwrite sass variables with your own values, you have to use @use
and the with
keyword, which takes a Sass map.
There are two ways of importing the theme style:
The combined method is fairly straitforward. Define custom variables and then pass them in using with()
syntax. You can override any variable in Bulma or the theme which has a !default
by passing it in this way.
If you need to add custom color variants with this method you must use the $theme-bulma-custom-colors
variable.
// Option A: Include all styling (including bulma)
// Set your color overrides
$primary: #8c67ef;
$red: #f00;
$link: $primary;
// Add new colors to the colors map
$theme-bulma-custom-colors: ('tertiary': $red);
// Include the Oruga Bulma theme with Bulma included
@use '@oruga-ui/theme-bulma/dist/scss/bulma-build' with (
$family-primary: '"Nunito", sans-serif',
$primary: $primary,
$link: $link,
$theme-bulma-custom-colors: $custom-colors,
);
// Then add additional custom code here
// ...
When using this method, you will lose the theme customisation for the Bulma variables.
In the combined method the theme will add Oruga's standard secondary
color variant for you and you can add additional variants using $theme-bulma-custom-colors
. Using the separate method, you have to do this in your code instead using Bulma's $custom-colors
var, which will be implicitly passed to the theme behind the scenes.
You have to be aware of importing Bulma, @use "bulma/sass" with (...)
before any other Bulma usage. If you reference Bulma beforehand, for example to use a Bulma mixin to create a colour to pass to Bulma, you will get sass scope problems.
// Option B: Include the Oruga theme and Bulma separately
// Assemble color variables
$red: #f00;
$green: #0f0;
$blue: #00f;
$black: #000;
$dark-grey: #6c757d;
$speed-slower: 1000ms;
// Custom colors is required if you want the secondary variant. Nothing will break if you omit it though.
$custom-colors: (
// Add the standard Oruga secondary variant
'secondary': $dark-grey,
// If you want to add additional custom colors to the colors map add them here
'tertiary': $red
);
// Pass any Bulma variables you'd like to override here
@use "bulma/sass" with (
$red: $red,
$blue: $blue,
$green: $green,
$black: $black,
$primary: $green,
$custom-colors: $custom-colors,
);
// Pass any theme variables you'd like to override here
@use "@oruga-ui/theme-bulma/dist/scss/components-build.scss" with (
$speed-slower: $speed-slower,
);
// Then add additional custom code here
// ...
In case you want to replace the default style of a component you can override or add new classes changing bulmaConfig
; more details about components customization on https://oruga-ui.com/documentation/customisation.html
import { createApp } from 'vue'
import Oruga from '@oruga-ui/oruga-next'
import { bulmaConfig } from '@oruga-ui/theme-bulma'
import '@oruga-ui/theme-bulma/dist/bulma.css'
const customBulmaConfig = {
...bulmaConfig,
checkbox: {
override: true,
rootClass: 'checkbox'
}
}
createApp(App)
.use(Oruga, customBulmaConfig)
.mount('#app')
Thank you to everyone involved for improving this project, day by day 💚
Logo designed by rubjo
Code released under MIT license.
FAQs
Bulma theme for Oruga
The npm package @oruga-ui/theme-bulma receives a total of 4,512 weekly downloads. As such, @oruga-ui/theme-bulma popularity was classified as popular.
We found that @oruga-ui/theme-bulma demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.