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

Cant change variable using scss variable #87

Closed
bagaskarala opened this issue Feb 10, 2021 · 3 comments
Closed

Cant change variable using scss variable #87

bagaskarala opened this issue Feb 10, 2021 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@bagaskarala
Copy link

Overview of the problem

Oruga version: [0.3.3]
Vuejs version: [2.6.12]
OS/Browser: Chrome

Description

Cant change using scss variable

Steps to reproduce

i'm using nuxt and import like this

import Vue from 'vue'
import Oruga from '@oruga-ui/oruga'
import '@oruga-ui/oruga/dist/oruga-full-vars.css'

Vue.use(Oruga)

then i created index.scss file to customize. i can do it using css variable like this:

:root {
    --oruga-pagination-margin: 1em;
}

but when i using scss variable, it wont work:

$pagination-margin: 1em;

How to override style using scss variable, there is no docs for this
https://oruga.io/documentation/#using-css-or-sass-scss-variables

@bagaskarala bagaskarala changed the title Cant change variabel using scss variable Cant change variableusing scss variable Feb 10, 2021
@bagaskarala bagaskarala changed the title Cant change variableusing scss variable Cant change variable using scss variable Feb 10, 2021
@bagaskarala
Copy link
Author

bagaskarala commented Feb 10, 2021

I've solved myself, here the step:

  1. install sass instead node-sass
  2. import our custom variable then import oruga scss
@import "./variables";
@import "node_modules/@oruga-ui/oruga/src/scss/oruga-full.scss";

Is my step correct? you should add this step to docs.

@jtommy
Copy link
Member

jtommy commented Feb 11, 2021

Yes it's correct! We'll add an example in the docs

@jtommy jtommy self-assigned this Feb 11, 2021
@jtommy jtommy added the documentation Improvements or additions to documentation label Feb 11, 2021
@astagi
Copy link
Member

astagi commented Mar 11, 2021

@bagaskarala thanks for your suggestion, these steps will be added to documentation asap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants