question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When clearing list of elements with nth-child CSS peudo element, the last element of each line is not dragabble

See original GitHub issue

Do not know why, but when using these rules to clear elements each 4 elements, the last element of each line stay fix, not dragabble

image

.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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Lazac92commented, Sep 11, 2017

@VernalVessel

Here is an example: https://jsfiddle.net/Lazac92/vn5qt15m/

It is working in firefox, but not in chrome or safari.

1reaction
Lazac92commented, Aug 10, 2017

+1

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found