Comments (13)
@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.
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.
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.
@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.
FLA is now on npm: https://www.npmjs.com/package/flex-layout-attribute
@thinkholic I appreciate your understanding. Thanks.
from flex-layout-attribute.
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.
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.
Agreed, it should be data-layout
. This is why data-attributes were introduced in the first place.
from flex-layout-attribute.
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.
@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.
@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.
He should be willing to hand it over for sure. So, first contact the author.
from flex-layout-attribute.
@aziz , did you find a solution for your react app? Isn't working for me either...
from flex-layout-attribute.
Related Issues (16)
- Why not use “align-self:flex-start” instead of “top”? HOT 3
- [question] Bower or Npm? HOT 5
- Layout attribute
- Choose width of main container HOT 2
- Websites created with FLA? HOT 1
- Baseline aligment missing. HOT 1
- Attributes do not work with ReactJS HOT 1
- Edge performance problems HOT 2
- Centering seems to have failed in the online demo HOT 1
- Browser Support?? HOT 3
- Explicit size weirdly always operates on width HOT 1
- Attribute selector performance over class selectors HOT 1
- Bower package HOT 1
- The latest version problem on npm HOT 2
- Browser support? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flex-layout-attribute.