question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Overriding Sass variables independently in a page

See original GitHub issue

Short description of the problem:

I don’t success to override Sass variables. Issue very close to issue #7500

What behavior are you expecting?

I expect to change the color of a tab bar by updating the Sass variable in my page scss file. But updating $tabs-md-background did not change anything.

Steps to reproduce:

  1. put the line “$tabs-md-background: red;” into the scss file of a page: nothing change
  2. put the @import “app.core” at the beginning of app.ios.scss, app.md.scss and app.wp.scss: it works. But I guess it is an huggly solution.

Same behavior for the line: “$toolbar-inactive-color: red;”

Which Ionic version Ionic 2

Run ionic info from terminal/cmd prompt: (paste output below)

You have been opted out of telemetry. To change this, run: cordova telemetry on. 6.3.0 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.11 Ionic CLI Version: 2.0.0-beta.37 Ionic App Lib Version: 2.0.0-beta.20 OS: Windows 7 SP1 Node Version: v4.4.7


Dependency warning - for the CLI to run correctly, it is highly recommended to install/upgrade the following:

Please install your Cordova CLI to version >=4.2.0 npm install -g cordova


Thank you by advance for your help,

Olivier.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kolayrandevucommented, Feb 27, 2017

I have the exact same problem.

0reactions
ionitron-bot[bot]commented, Sep 1, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overriding Sass variables independently in a page #7775
Hello! Thanks for opening an issue with us! The correct place to override sass variables are in the themes/app.variables.scss file. There is ...
Read more >
Override a SASS Variable in the page scss - Ionic Forum
so lets say I want to override Sass var for ion-Item $item-ios-paragraph-font-size. for the page im on. Please don't give me the color ......
Read more >
A story about overriding SASS variables and the '!default ...
This article describes how to use the !default keyword in SCSS when overriding variables. It will also save you a few hours of...
Read more >
Overriding variables - best practice [#3260038] | Drupal.org
I'm new to SASS. What's the correct way to alter values for variables that are defined in SUBTHEME/node_modules/bootstrap/scss/_variables.
Read more >
Overriding SCSS variables | JavaScript - EJ 2 Forums
We can override the SCSS variables after referring its definition file to achieve your requirement instead of adding !default flag to each ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found