Giter VIP home page Giter VIP logo

Comments (13)

StefanKovac avatar StefanKovac commented on June 19, 2024 3

@emitremmus basically what @mr-moon said. You can build custom version of FLA (from sass files provided) based on attribute names you like — set this variables. e.g. $LAYOUT : "data-layout";

Hope that helps. Thanks.

from flex-layout-attribute.

StefanKovac avatar StefanKovac commented on June 19, 2024 1

Besides clarity, I like unprefixed layout attribute for what it represents — a non-standard attribute for non-standard way of dealing with flexbox layout.

Personally, I don't see real benefits of using data- prefix beside W3C compliance, which I frankly find irrelevant in this case. However, I'm leaving this issue open (for a while) in case I'm missing something.

Thanks @cesarasaservice @hugogiraudel

from flex-layout-attribute.

aziz avatar aziz commented on June 19, 2024 1

It can not be used out of the box with React.js since it's removing layout attribute. Changing it to data-layout will fix this issue.

from flex-layout-attribute.

aziz avatar aziz commented on June 19, 2024 1

@StefanKovac all those methods you linked above are frowned upon and not recommended in our team.
I still think adding a little data- and making it future proof is a much better and more reliable choice.

from flex-layout-attribute.

StefanKovac avatar StefanKovac commented on June 19, 2024 1

FLA is now on npm: https://www.npmjs.com/package/flex-layout-attribute

@thinkholic I appreciate your understanding. Thanks.

from flex-layout-attribute.

mr-moon avatar mr-moon commented on June 19, 2024

It can be possibly fixed by prefixing layout with data- prefix, then it'll validate. However, it looks very minor to me.

from flex-layout-attribute.

nltncsr avatar nltncsr commented on June 19, 2024

That can be added on a major version, like in 2.0.0, as well as supports to others CSS preprocessors.

from flex-layout-attribute.

KittyGiraudel avatar KittyGiraudel commented on June 19, 2024

Agreed, it should be data-layout. This is why data-attributes were introduced in the first place.

from flex-layout-attribute.

StefanKovac avatar StefanKovac commented on June 19, 2024

Hey @aziz that's interesting. I've never used React but did you tried http://stackoverflow.com/questions/31273093/how-to-add-custom-html-attributes-in-jsx or http://stackoverflow.com/a/33860892/6392049 ?

from flex-layout-attribute.

aziz avatar aziz commented on June 19, 2024

@StefanKovac could you publish the scss source along with the css to the npm so that we can use the scss version to do out customization rather than hard copying it from your repo.

from flex-layout-attribute.

StefanKovac avatar StefanKovac commented on June 19, 2024

@aziz apparently npm package name is taken !? Someone already created it with only css files. Now, should I contact the author to transfer ownership or create scoped package?

from flex-layout-attribute.

aziz avatar aziz commented on June 19, 2024

He should be willing to hand it over for sure. So, first contact the author.

from flex-layout-attribute.

danielkrich avatar danielkrich commented on June 19, 2024

@aziz , did you find a solution for your react app? Isn't working for me either...

from flex-layout-attribute.

Related Issues (16)

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.