The _tweets.scss you want to reflect in views/tweets/index.html.haml is listed as assembets/modules/_tweets.scss.
application.scss can be found in
@import "reset";
@import "font-awesome-sprockets";
@import "font-awesome";
@import "modules/tweets";
@import "modules/index";
However, the modules/index scss is reflected in the haml.
How can it be reflected as above?
I'm sorry for my poor writing, but I'd appreciate it if someone could tell me.
The style of modules/_index.scss
imported later overrides the style set in modules/_tweets.scss
, so you can change the import order as follows:
@import "reset";
@import "font-awesome-sprockets";
@import "font-awesome";
@import "modules/index";
@import "modules/tweets";
Consider the following SCSS:
//style.scss
@import "tweets";
@import "index";
// _tweets.scss
.hoge{
color:red;
}
// _index.scss
.hoge{
color:blue;
}
Convert style.scss
to CSS and you'll see the following (we experimented with https://sass.js.org/):
.hoge{
color:red;
}
.hoge{
color:blue;
}
The CSS applies the properties written after the CSS in principle, so color:blue;
is applied and color:red;
is ignored.
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.