I'd like to define my vars in Meteor's /client/styles/vars.less and import it into Semantic's site.variables.import.less but can't seem to figure out how.
Using #import "../../../../styles/vars.less" didn't seem to work, neither did #import "{}/client/styles/vars.less"
turns out it was working, but the automatic reloading wasn't picking it up. doing meteor reset and meteor got it working!
Related
I am trying to use #import rule on my styles so that I can manage them in a more efficient way but unfortunately it is not working. I am getting the error below. The thing is that I see in many odoo themes that people use it. So, what is missing then? I would appreciate, if you know the solution.
Style error
The style compilation failed, see the error below. Your recent actions may be the cause, please try reverting the changes you made.
Local import './main' is forbidden for security reasons. Please remove all #import {your_file} imports in your custom files. In Odoo you have to import all files in the assets, and not through the #import statement.
I am using styled-components in a React project. So far it has been working fine, but now I want to use the react-datepicker package, which requires its styles to be imported the following way:
import "react-datepicker/dist/react-datepicker.css";
However, importing the file causes an error that says "You may need an appropriate loader to handle this file type". I know I could fix this by creating a handler for .css files, but I thought I could avoid that by using Styled Components.
My question is, is there a way to handle these type of imports with styled components? I've been loooking online for hours and can't seem to find a way.
I ended up just forking the project and changing it to use styled-components instead of needing to import the styles.
In a NativeScript app I'm trying to apply some global styles that will be shared across the app.
This is my structure:
- styles
- partials
- _buttons.scss
- _exports.scss
_buttons.scss:
.flt-btn {
border-radius: 35px;
}
_exports.scss:
#import '_buttons.scss';
app.css:
#import './styles/partials/_exports.scss';
As you can see the the styles for .flt-btn should be applied, but they're not.
I'm using the class in a feature module that's lazy loaded, login like this:
<Button class="flt-btn" text="A button"></Button>
If I put the btn styles directly in app.css without any imports it works, but since this is a css file I can't use scss in it. So I'm not sure if the imports will ever work by doing it like this.
How can I make sure that the styles from the partials imports are applied application-wide?
EDIT:
I found this, which successfully imports my own styles into app.android.css and app.ios.css files. BUT.. After I've installed SASS and done this the app is just completely blank when I run it in the emulator, both in android and ios.
I get no errors, nothing. Has anyone successfully been able to get sass working like this? Please let me know how and thou shalt be rewarded.
EDIT 2:
It looks like the app is running, because I can successfully log something in the app.component.ts's constructor, so I'm guessing that something is causing all the elements on the page to disappear with the new styles settings.
I found this guide: https://docs.nativescript.org/ui/theme#sass-usage
Which is the correct way to go about this. This will create a scss/css file for android and ios as well as creating an _app-common.scss file which you can use to import your own custom styles into. This will then be applied to the android and ios css.
Strangely enough the component scss works without installing sass like above. But after installing sass you can no longer reference the scss file in the styleUrls property of a component, it should now instead link to the css file. Why this is I haven't been able to figure out, but I guess it's not a big deal since it at least works.
The answer provided by #tay hua is incorrect, as it refers to the angular-cli rather than the nativescript-cli, so if you're like me and got stuck on this, this is the answer you should be looking at.
Preface: I can't use webpack. It breaks too much of my AWS stuff and I'm too frustrated finding ever more problems. I wish I could use the convenience of webpack but I stopped using it and AWS now works. Now its all watchify and babel.
Can I use CSS/Sass without using Webpack (as mentioned) or import CSS Modules, PostCSS etc?
Issue: I can link a css file, pass in the classes to my component and it all renders out proper div / class syntax, but (I assume) the virtual DOM just doesnt load it. How can I get around this?
[Edited as I got a down-vote, just to be safe.]
You can just run gulp, and gulp-sass. That compiles a .css file and you can just manually include that file in the <head> of your file. Try there are dozens of tutorials on Google like this one
I currently have a web application which is using SCSS, symphony, and doctrine amongst other libraries. It's well setup and heavily structured.
We are currently attempting to use Bootstrap.css to style it visually, however it's become quite an issue as we began trying to use SASS/SCSS #import function so we could #extend bootstraps classes. However when attempting to do so, it became problematic.
#import url('/bundles/iccsrpit/sass/css/_bootstrap.scss');
The above somewhat works (the code is never actually included in the css file when looking at Firebug. I can click on the path, and it brings me to the file.
#import '/bundles/iccsrpit/sass/css/_bootstrap.scss';
Causes a complete break of the CSS file, and I'm not sure why I can't access the file in this manner.
If anyone can offer a solution to this problem, please help!
Thank you,
iRed