When clearing list of elements with nth-child CSS peudo element, the last element of each line is not dragabble
See original GitHub issueDo not know why, but when using these rules to clear elements each 4 elements, the last element of each line stay fix, not dragabble
.nbr-per-line-4 {
width: 25%;
float: left;
&:nth-child(4n+1) {
clear:left; // <--- if we comment this property, this will works
}
}
<div v-if="lookProductArray.length > 0" class="productListContainer">
<draggable>
<div v-for="lookProduct in lookProductArray" class="product-card-wrapper nbr-per-line-4">
<product-card>
<!-- component content here -->
</product-card>
</div>
<!-- </div> -->
</draggable>
</div>
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
nth-last-child() - CSS: Cascading Style Sheets - MDN Web Docs
The :nth-last-child() CSS pseudo-class matches elements based on their position among a group of siblings, counting from the end.
Read more >nth-child - CSS-Tricks
The :nth-child selector allows you to select one or more elements based on their source order, according to a formula.
Read more >not(:last-child):after pseudo elements for each row inside an ...
I'm using an unordered list like this: ul { padding-left: 0; margin-left: 0; ...
Read more >An Ultimate Guide To CSS Pseudo Classes And Pseudo ...
CSS pseudo -classes and pseudo-elements can certainly be a handful. This guide will help you to learn about all the things you need...
Read more >How to Select All Child Elements Except the Last One - W3docs
Sometimes, you may need to select all the child elements except the last element. It's quite easy to do this using the :not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@VernalVessel
Here is an example: https://jsfiddle.net/Lazac92/vn5qt15m/
It is working in firefox, but not in chrome or safari.
+1