I've made a library in flex with different components and my CSS I want to use in different projects (the goal of a library....).
BUT even if I can use my components, I can't use my CSS file which is in the library.
When I try <mx:Style source="assets/style.css" />, it wasn't found :(
So, how I should do to have a CSS file in my library which can be use in a project ??
Thanks for all your help
Right click your project in the package explorer and locate your CSS file. It should show up automatically if your source path is set up correctly and the asset is descendant of that directory. Then just make sure the checkbox next to the CSS file name is checked.
Related
I am very new to Angular and currently I am trying to add styling to an existing project.
The project has been constructed using components. So for each page there are 4 files,
mypage.component.css
mypage.component.html
mypage.component.spec.ts
mypage.component.ts
I can easily style the page by adding the styles to the css file in the component and the page style works perfectly.
However the issue is there are many pages that require the same styles again and again.
I can copy and paste the same styles to each css file and it works.
But this is not the most elegant or efficient way to do this.
I want to know what the correct way to add a global.css file so that it can be accessed by each page. So that way the css is only written once.
I have googled but haven't found anything that explains how to do it in simple ways.
Thanks
Angular adds the style.css/scss file by default to your project once you created it using the ng new command, and include it within the angular.json config file to be available across the components of the project.
So you can add any global styles within src/styles.css(or scss) file, to be implemented everywhere.
you can add your generic css into style.css/style.scss.
Django REST framework uses Bootstrap and has its own CSS files in it. It seems like PyCharm imports those files for code completion popups. The things is, I don't want those as I use different CSS framework and in fact, it's confusing me because all those Bootstrap autocomplete popups when I'm trying to set CSS classes and so on.
So my question is, is there any way I can disable code completion popups from certain CSS files?
I did not face with this problem until now,but I think you should disable these folders is Pycharm, try this :
Settings|Directories -> Use Exclude button on folder
Good afternoon.
Premise: I’m not a web developer and I have little familiarity with all these new names that emerge as mushrooms from one moment to the next. Then I ask you not to give nothing for granted.
My question is very simple: I want to target bootstrap 4 style only on a specific elements (e.g. a div) of my page: the rest of the page hasn't to be involved with this styles.
I notice that a colleague of mine used LESS on an older bootstrap version but I red that it is not support in Bootrastrap 4.
Any ideas?
Thanks,
Sergio
I think to have found the solution but I'd like know if it is the right way.
Here my steps:
I downloaded Bootstrap 4 files using
npm install bootstrap#4.0.0-alpha.6
from dos prompt inside a local folder
Then I modified bootstrap.scss file placed inside node_modules\bootstrap\scss surrounding all code with a class (e.g. .thisismyclass{...})
I then downloaded Koala from this site
http://koala-app.com/
I added the entire local folder (where the boostrap files are) in the Koala UI.
Automatically it create the .css files near the scss files with the reference to my manually added class.
Now, in my page, I added the refernce to my new css and then I added my main class to the div which must use Bootstrap styles.
It's right?
Thanks,
Sergio
I write a Meego App. But the CSS sytle not work normally. And I want to know how to get the CSS sytle works ? THX.
My Steps:
in .pro, add meegotouch lib
css file named style.css and I add a qrc file to reference the style.css
in Code, just load the css style.
MTheme::loadCSS(":/style/style.css");
at the first time, the style works, but it fail to change the style when I re-write some attributes in the CSS file.
And I have to re-name the css file(maybe style1.css) and re-add in the qrc file, it will get work.
Any solution or did I miss something??
It would help if you included more code.
The only thing that I can think of is the simple problem of not reloading the application (or at least re-running the method where you load the css file) after you change the css file.
But I still don't know what you're doing.
It seems it isn't possible at runtime to change styling defined in CSS files, ex.: colors. This is seemingly because the CSS files are compiled into SWF.
Is it possible to externalize styling information in CSS (or any other format) without compiling it to SWF file so that it can be changed easily at runtime just as normal CSS can be changed when it is used in HTML.
You can do this in Flex 3, Loading an external CSS file and hopes similarly can be used for Flex 4 as
Load CSS File using URLLoader
List item Parse it with StyleSheet parseCSS function
Assign it to Application
Also see StyleSheet
Hopes that helps
We eventually found a way of applying styling, without having a compilation step. We are sticking to basics.
We defined a configuration XML file and using onPre method of mx:application we read this XML file and applied the styling to UI components.
This approach ensured that the styling is centralized at least at application level and most importantly it is now possible to quickly try out new styles by changing the configuration file and refreshing the page.
I suppose this documentation answers all your questions. You have to use some CSS at compile time but you can load and apply another one at runtime without problem.