Giter VIP home page Giter VIP logo

Comments (2)

redonkulus avatar redonkulus commented on August 31, 2024

Thank you for the report. I noticed your codepen didn't have any atomizer classes in it. I tried the following out in our REPL:

<div class="Mx(0)"></div>
<div class="Mend(0):lc"></div>
<div class="Mend(0):l"></div>

Which produced:

.Mx\(0\) {
  margin-left: 0;
}
.Mx\(0\), .Mend\(0\)\:l:left, .Mend\(0\)\:lc:last-child {
  margin-right: 0;
}

I see Mx(0) getting both margin's applied. Which issue were you seeing again?

from atomizer.

maheshbansod avatar maheshbansod commented on August 31, 2024

Yes, those are the classes produced, but that style(margin-right: 0) isn't getting applied to the elements for me.
I took those atomizer classes and tried to showcase the issue better in this codepen: https://codepen.io/maheshbansod/pen/xxJYRbj
Pasting the same code here too:
CSS:

div {
  margin: 30px;
  color: white;
}
.Mx\(0\) {
  margin-left: 0;
}
.Mx\(0\), .Mend\(0\)\:l:left, .Mend\(0\)\:lc:last-child {
  margin-right: 0;
}

HTML:

<div style="background-color: blue;">
  <div style="background-color: red;" class="Mx(0)">
    Expected margin 0 on both sides but observed margin 0 only on left
  </div>
</div>
<div style="background-color: blue;">
  <div style="background-color: red" class="Mend(0):lc">Expected margin zero on both sides(because this div is the last child), but observed 30px on both sides</div>
</div>

If we look in Chrome devtools, you'll notice that the margin-right:0 style isn't even getting overridden, it's just not applied at all to the divs.
Removing the class .Mend\(0\)\:l:left from there fixes it and the observations will match the expectations.
I can see this on Chrome on Mac.
Let me know if any other information is required if this isn't getting reproduced at your end.

from atomizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.