15,491 questions
0
votes
0
answers
21
views
Library's global styles overriding scoped CSS layers
I am working on a Vue 3 project using SCSS and it's using Histoire to document its components. I just stumbled upon an irritating problem: the project uses layers on all classes to separate ui ...
0
votes
0
answers
27
views
How to select the nth child element that contains a specific attribute in CSS [duplicate]
Below is my HTML code that showcase the problem. Without modifying the HTML structure or adding a class is it possible to select the 3rd span.chatbot-bot-response-inner that contains for example img[...
-1
votes
1
answer
48
views
Why does my image overflow with a defined max-width but works fine with a defined width? [closed]
When I have the width style of an image defined to be 100% of the parent then the image does not overflow. But, when I define the max-width to be 100% of the parent then it overflows. Here is my ...
0
votes
0
answers
49
views
PostCSS parent Selector is adding :is() pseudo after compilation and not producing compatible css
I have just migrated from SCSS to PostCSS and encountered only one issue I cannot resolve.
The issue concerns how to alter a the styles of a nested element when its parent has a specific class.
The ...
6
votes
1
answer
140
views
CSS nth-of-type; but how to only effect types directly in series
Let's say we have a list of items, with splitter elements (<h3>), for example dates :
<h2>Big Header</h2>
<div id='container'>
<h3>Week Title A</h3>
<...
1
vote
1
answer
64
views
Unexpected variable resolution order in CSS with var/property nesting [duplicate]
My goal is to have an architecture where the shadow is defined once, but the color changes depending on HTML attribute data-color-mode.
Note: code provided is just for the isolated problem ...
0
votes
1
answer
50
views
Hide a ::before overlay when a parent's attribute changes, after solving a duplicate pseudo-element issue
I'm developing a custom user stylesheet for YouTube to add a "WATCHED" overlay to video thumbnails.
My main objective is: The overlay should be visible on any video that has been watched, ...
3
votes
3
answers
129
views
Is it possible to select the first row in a table with CSS?
Given:
<table>
<caption>Table Title</caption>
<thead>
<tr>...</tr>
</thead>
<tbody>
<tr>...</tr>
</tbody>
</table&...
3
votes
1
answer
97
views
CSS selector computed aria name
Is it possible to select via a CSS selector (or xpath) an element based on its computed aria name (=accessible name)? For instance for buttons it is computed like
The button has an accessible label. ...
1
vote
1
answer
78
views
How to select all but the last-child, unless the last is also the first
Not that two lines versus one is an issue; but I'd like to learn if there is a more concise way of selecting all but the last-child unless the last-child is also the first-child or only-child, in ...
1
vote
1
answer
77
views
I can't select the css element to data scrape in R. How do I format it to select the information?
I am learning to scrape data and using the website https://quotes.toscrape.com/ as a training dataset. When I try to collect the about section links, I get this error: Error in html_attr(html_elements(...
0
votes
3
answers
55
views
Is there a way to stack a pseudo-element *behind* its <p> parent's text gradient fill?
Here is my snippet.
The <p> is the text "Cool CDs", which appears as a gradient-filled text (with the use of background-clip:text).
p::before is a slightly shifted-down stroke that I ...
0
votes
0
answers
12
views
CSS override issue: .abnormal class not overriding .plan-box div padding [duplicate]
I'm working on a pricing section where each plan is inside a `.plan-box`. All direct `<div>` elements inside `.plan-box` have a general style:
```css
.plan-box div {
padding: 15px;
...
0
votes
0
answers
31
views
How to check whether one element only has specific range of children types? [duplicate]
Minimal demo:
<div class="demo">
<img class="child1">
<p class='child2'>a</p>
</div>
<div class="demo">
<img class="...
1
vote
1
answer
51
views
Is whitespace required between the attribute selector sensitivty flag and a preceding token?
Regarding CSS attribute matching, is [href="http"i] legal syntax, no space between the ‘"’ and the ‘i’, or does there have to be whitespace, i.e. [href="http" i]?
The W3C ...