Questions tagged [css]
Cascading Style Sheets (CSS) is a language for specifying the layout and presentation in general of markup such as HTML and XML.
280
questions
-1
votes
2
answers
149
views
Could there be a <flex> tag?
<div> tags are display: block per default. <span> tags are display: inline per default. Could there be a tag that is display: flex per default? I don't mean a class, like bootstrap has. I ...
1
vote
1
answer
375
views
Using JS and CSS parent selector to replace media queries: is it a good practice?
I really don't like media queries in CSS - they have limitations, and on top of that they make the code a lot more confusing.
In addition, the restrictions are so strong that when using CSS ...
1
vote
2
answers
63
views
Hierachy and API design for a CSS-selector-related Python library
I'm writing a Python CSS-selector library that allows one to write these kinds of expressions in Python as a pet project. The goal of the library is to represent selectors in a flat, intuitive and ...
1
vote
2
answers
80
views
Crossbrowser testing FrontEnd apps in 2022
So nowadays, creating js & css that works the same across different browsers is less of an issue as to what it was a few years back.
So let's say I have this Vue app that -
Has CSS reset
Include @...
-1
votes
1
answer
164
views
Is the BEM methodology in the large project used correctly
I am creating SCSS for the large project, I decided to use BEM methodology. I will have a lot of containers. I have question about BEM and about best practices.
My current code:
.footer {
&...
0
votes
1
answer
267
views
Should I use SCSS mixins as shortcuts for default CSS syntax?
This question is mainly about readability and understanding of the code. Im am also in the process of creating a SCSS framework like Compass and Bourbon.
I struggle to write SCSS because I like to see ...
1
vote
1
answer
369
views
Semantic Versioning for CSS
I maintain a CSS framework that is versioning with semantic versioning.
What changes to a CSS framework are considered major, minor, and patches? Specifically, what is the "API" of a CSS ...
1
vote
1
answer
310
views
Advantages and disadvantages of including JS/CSS inside the HTML?
What are the advantages and disadvantages of including JS/CSS inside the HTML instead of separated files?
Specifically concerned about performance issues, for example, if the CSS and JS are small and ...
-3
votes
1
answer
91
views
Choosing between network optimisation and CPU usage in clientside web development [closed]
I'm working on a CSS library that includes hundreds of selectors and rules for quick templating instead of writing regular CSS.
This is used as a replacement of attr() CSS function until it works for ...
-3
votes
1
answer
95
views
doesn't inline-styling represent separation of concerns concept the best way if you think that you're separating the HTML element from other elements?
I know that Inline CSS styling gets so much hate from many developers, and I understand that some of this hate is justified by the following facts:
Inline styles increase page size as they don't get ...
2
votes
0
answers
1k
views
Setting width/height of unknown images for lazy loading
I have a site where users upload images & can all be viewed on a single page by other users. I want to lazy load images as the user scrolls instead of loading all initially. This is easy enough, ...
-3
votes
1
answer
4k
views
How do I set a darker background color on hover *without knowing the original color*?
I've tried everything related to filter and backdrop-filter, but nothing seems to work. I've searched online but not found a single article addressing this (which is odd).
I simply want to set the ...
0
votes
1
answer
1k
views
What are downsides to opening local html files in the browser?
Let's say you have a scenario where you want to build a simple web stack (html/css/js) prototype to share with someone.
I am a little unclear on whether or not I want/need to use a small web-server to ...
-3
votes
1
answer
68
views
How would you architect a simple cascading style sheet object?
How would you architect a simple cascading stylesheet like inheritance object?
For example, I have Apple that extends Fruit.
class Fruit {
constructor() {
this.total = 10;
}
}
...
6
votes
2
answers
829
views
Why don't web browsers know the physical dimensions of a display?
CSS is a syntax for specifying the appearance of text and other web content, sizes and lengths are defined in pixels, however pixels have different sizes in different devices, this is the most notable ...