Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I'm thinking of two options to load my css and wondering which one is the most efficient one?
Using small bits of css files and import them into a single main styles.css and use this file in the head section.
Using a common css file that contains code that applies to all pages and then create separate page-specific css files and include them in the page that need them. For example, the css for a contact page will only be used on the contact page so no need to load those css in other pages.
So which way would you go?
Thanks
The best way is using a single external "minified" CSS file for all pages. because the browser caches this file and then only the cached version will be loaded in the next load times. so your CSS load speed remains fast. but try to minify it .
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 months ago.
Improve this question
I started working on an app made with tsx. This app has a general stylesheet for everything and some of the components have inline styling. Personally it feels disorganized.
I'm a biginner at css so I don't know what would be the best way to aproach this. I thought of two options: do all inline styling or make a stylesheet for each component. The first feels wrong ,in the second I'm gonna end up with 30 stylesheets and the overrides are going to mess up everithing.
The styled-components library is universally popular and you'll find plenty of support from the large community that uses it. With this you can write your css inside your component files. I'd also recommend getting the VS-Code extension for it so that you get css intellisense.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm new in reactJs and I'm using webpack-dev-server to compile and check my code, the problem is that when I add a stylesheet to the sources as an imported file in the result everything is shown well and also in the output folder with the plugin I've imported the bundle.js file update but there is no sign of stylesheet file
My question is that what happened to the css file ? is that necessary to be there? or the styles are composed by the output js file? because when i moved the file it works fine again without any problem.
tnx
In production you probably wants to include all your CSS in one bundle file minifiying the result and exclude all CSS files not minified you used for actual development.
To do this you could use a CSS Loader, there are several options, one could be:
https://github.com/webpack-contrib/css-loader
An interesting article, it should help you to get started:
https://medium.com/trabe/multiple-css-bundles-with-webpack-75f263095f09
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have been taught that one can not apply CSS to cross origin iframes, but I have found that Stylebot applies CSS to iframes successfully with no problem at all.
How is this possible?
Is there any chance I can do the same in my website?
You can't apply custom CSS to cross-origin iframe ( you can only if you have direct access to the both servers )
But..
Extensions can avoid those rules because files in extensions have different policy rules. So basically you can add a JavaScript file to each and every page or iframe. And from there you can basically do anything. And this JavaScript file that was injected by your extension will never be blocked. Each and every browser has its own API, about Chrome's way of doing things you can read here :
https://developer.chrome.com/extensions/content_scripts
About extensions you can read here:
https://developer.chrome.com/extensions/getstarted
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Not sure if this is a stupid question or not,
but i want to create a better looking notes database which should remind users of our companys homepage.
Is it possible to use codes extracts of the wordpress themes css code?!
It might be easier to start with the Bootstrap4 XPages plugin on openNTF and then work to skin that.
As long as CSS stylesheets don't reference by element ID, it's possible to utilise elements. However, bear in mind that parts of the CSS stylesheets you're using may get overwritten by inline styles or stylesheets from the XPages runtime itself. In my experience, you will usually need to make some modifications to the stylesheets your using, but it's doable.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I Just created a Responsive home web page with 4 responsive stylesheets. I just want to "Manually" Combine the code of all 4 stylesheets into One stylesheet. Please tell how to do it.
You can use YUI compressor to minify them and have them all into a single stream that you can paste in a single file. You can do this manually, or have a simple script that you run when you deploy.
You can try if it works for you online.