Giter Club home page Giter Club logo

Comments (8)

kmkr avatar kmkr commented on August 29, 2024

PR #15 is meant to fix this. I'm not sure why text-align-last was added in the first place, so please verify that the change do not break that before consider accepting the PR.

from reflex.

leejordan avatar leejordan commented on August 29, 2024

Thanks for your pull request. The text-align reset is due to the way the inline-block fallback works with use of text-align. If you have a right aligned grid, you probably don't want the grid contents to inherit this, hence I reset everything to left/start.

text-align-last is the closest fallback possible for justify-content: space-between

Also I don't think text-align: auto is a valid css property. Can you explain further please?

https://developer.mozilla.org/en/docs/Web/CSS/text-align

I'll take a proper look in the near future.

from reflex.

kmkr avatar kmkr commented on August 29, 2024

The text-align reset is due to the way the inline-block fallback works with use of text-align. If you have a right aligned grid, you probably don't want the grid contents to inherit this, hence I reset everything to left/start.

Ok, I see.

Also I don't think text-align: auto is a valid css property. Can you explain further please?

That's correct, sorry. It was supposed to be unset for the text-align, and auto only for text-align-left. It's fixed in the PR. text-align-left set to auto should use the value from text-align that's unset. I believe this will do the same trick for you (setting to left) without forcing children to override the text-align-last.

from reflex.

leejordan avatar leejordan commented on August 29, 2024

Thanks for explaining this sounds pretty good to me. I'll take a proper look and test it out in the future.

from reflex.

xla avatar xla commented on August 29, 2024

@leejordan 👍 On smoothing the assumptions around text aligning.

from reflex.

leejordan avatar leejordan commented on August 29, 2024

I've addressed this issue in a recent commit 758c9b4

showing fix based on your demo: http://plnkr.co/edit/TYwQkEi22YaGzkSsI6gF?p=preview

I've opted to use the "initial" property because it fixes the issue you demonstrated in your demo. It makes the text alignment reset much less aggressive and allows you to more easily have differently aligned elements within the grid. It also plays nicely with the fallback inline-block grid.

Thanks very much for taking the time to produce a demo of the problem. Let me know if you have any further issues. I'll be creating release 1.0.8 shortly which will contain this fix among others and I will update the npm version at the same time.

from reflex.

xla avatar xla commented on August 29, 2024

@kmkr @leejordan Thanks a lot! 🍡

from reflex.

pixeldesignstudio avatar pixeldesignstudio commented on August 29, 2024

This issue is still present in the newest release.
My custom class .text-center doesn't work because of the aggressive selector.
!important is no option in my opinion.

from reflex.

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.