Best practice to style react components? [closed] - css

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.

Related

Creating different stylesheet for CSS3 seperated from main stylesheet [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 7 years ago.
Improve this question
In my web project, I made an extra CSS file (for example css3.css) only for CSS3 properties. That means I separated the CSS3 code from my main CSS file (style.css). It helps me maintain the CSS3 properties for cross browser compatibility issues.
What kind of problems, if any, will this create for my website? What kind of problems, if any, will this create in terms of maintenance?
Thanks
No, because there is not a strict CSS2 vs. CSS3 separation, plus it would be a nightmare to maintain.
You want to address different browser vendors with post-processors like Autoprefixer for instance.
Or target different IE version via conditional comments.
On top of that, you should deliver a single, minified CSS file of your app, rather than many separate ones [unless you have good reasons for the split, e.g. loading a separate theme for mobile devices on slow connections].

CSS - Grid framework [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 have used both Foundation and Bootstrap, but I realised that the thing I only use it the grid.
I haven't had any problems with their grids, and don't really have a preference yet.
My question is, is it worth keep using them or is it better to use a framework that only has a grid system?
I prefer SASS over LESS
I'd keep using Bootstrap in case you ever want to borrow a bit of its functionality but don't want Bootstrap clashing with some other grid system's code.
If you don't want any of Bootstrap's extra styling muddling your design, follow these instructions to load only the grid from Bootstrap. Then, if you decide you need a quick dropdown navbar, just import the bits of Bootstrap you need.

Using (parts of) Wordpress Themes in xpages [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 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.

When I should use SASS for my projects? [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'm learning SASS and now I'm only reading sometings about it. When I should use it in my projects?
Is there some tricks about it? For example,
If lines of CSS file(s) are more than X,
If small,medium,large project,
If there are more than X class, field, id etc.
Because now I'm using only CSS3 for my projects and it seems enough for me.
Because SASS compiles to CSS, it cannot style to any greater degree than will normal CSS.
The reason to use SASS is to structure your stylesheets. SASS allows you to use mixins, variables, and functions, which allow you to DRY (Don't repeat yourself) up your code.
In the beggining with precompilers like Sass I used only minimum of functionality like nesting, variables , imports , some mixins.
Preprocessors don't learn you to write better code, it only ease the structuring , organization and can help you DRY your code.
Allways check output when you starting with preprocessors because you can bloat your CSS if you are not careful enough.
I use Sass in all project big and small and my favourite functionality is importing.

What are the challenges of making a CSS framework? [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 9 years ago.
Improve this question
I am studying some popular CSS frameworks like Bootstrap, Foundation etc. I pointed some out, and I'm willing to make my own CSS framework whether for my own projects or in later for free distribution. As I'm a front-end developer in most of the cases, I'm a bit slow with JavaScripts. So in my study I found some challenges in making a new CSS framework, like:
JavaScripts integration for a nice, clean and easy-to-use front-end
Common and general values for a fixed layout
The menu CSS
And also I found some features a bit challenging, like:
Responsive grids (I loved it)
But is there any checklist that should be fulfilled in CSS framework?
Maybe you can try yoeman to help you create your own css framework quickly and easily.
Here is the link on the details of Yoeman generator:
https://github.com/yeoman/yeoman/wiki/Generators

Resources