CSS vs SCSS in Rails application [closed] - css

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 have css files for a web application, how do I use it in Rails? I need to convert it to scss or to less? How do I go about doing this?

You don't have to convert your files to scss/sass/less, you can use it as is.

As #Mischa said you can continue to use css.
Copy your css files into assets/stylesheets then ensure application.css has the following include
*= require_tree .
This will then include all files withing the stylesheets folder.

Related

Styling with CSS in React [closed]

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 1 year ago.
Improve this question
All the project gets affected by changes I make in any CSS file even if it's not imported to that file.
for example: If I created a file called test1.js and imported a file called test.css inside of it then created a new file called test2.js and gave the same classes to its components they get styled the same way as test1.js even without importing the CSS file into it.
How can I get around this problem? is using SASS away to avoid it?
Can you please recommend the best practice for styling in react?

How can i stop prepos to create certain compiled scss other than main.scss [closed]

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 3 years ago.
Improve this question
Kindly see the option that I've tried which dont worked out for me.
You can right-click on the file in Prepros and select Disable Auto Compile.
I don't want anything processed except for my "main.scss" file. Is there a way to prevent Prepos from processing certain scss files
For all other files except for main.scss, add "_" before the name.
They are called partials. For example _variables.scss, _header.scss or _footer.scss and include them all in the beginning of the main.scss file

StyleSheet file in output folder [closed]

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

convert less to pure css or using less javascript library [closed]

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 8 years ago.
Improve this question
I just started using css less and thinking about which way is better: include less file to page with less.js library or convert less into pure css and include that file to a page.
Which way do you use and think which way is better?
I would compile the less to css and implement the compiled file to my site. I think this is the usual way to do this.
There are a lot of tools for this task. Take a look at compass and/or scout.
Compiling process can also do with commmand line itself or Gruntjs.
All of these tool compiling the less files onthefly.

How to Manually Combine the code of 4 Responsive stylesheets into One stylesheet [closed]

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.

Resources