Comments (7)
I've added the rest of the missing style properties you were talking about: the border stuff for every side. Now you can specify sides inidividually:
style.borderBottomWidth 20
style.borderBottomWidth (length.em 10)
style.borderBottomColor colors.red
style.borderBottomStyle borderStyle.dashed
Update Feliz and they should be available, if there any more properties that I've missed, please let me know!
from feliz.
I noticed with margin I could do:
style.margin length.auto
This indeed the way to do it! I all will length.inherit
and length.none
to them
From what I've read it sounds like you can only specify length.em once and the others must be int, does the length propagate for them?
No, but you can specify different lengths of different formats for each side:
style.margin(<top>, <right>, <bottom>, <left>)
What value do you want to get?
I've also noticed things like BorderBottom don't exist, but I'm not sure how I can modify only the bottom value given the overloads we have now.
borderBottom isn't added yet this is because there were a lot of overloads
borderBottomColor
borderBottomStyle
borderButtomWidth
borderTopColor
borderTopStyle
// etc.
I can definitely add them but if you are willing to add them as well with a PR, that would be awesome ❤️
I really love what you've done so far! It's a pleasure to use.
Thanks a lot!
from feliz.
The main issue I ran into with the current way of specifying style.margin is that if we don't know the other sides there isn't a way to just set one value. I'm using MaterialUI and so many different things could factor into what is setting the margin. If I want to modify specifically the behavior of the bottom margin, I need to know what the other values are, or use a custom attribute to set just margin-bottom
.
Ah cool, it would be nice to be able to just do:
style.margin(length.em 1, length.em 0)
Instead have to do this:
style.margin(length.em 1, length.em 0, length.em 1, length.em 0)
People probably would expect it since that's something you can do in CSS (like I did).
I started working on bindings for plotly.js
and react-plotly.js
and saw this and so I'm going to try to write them in this style. Once that's done if those aren't implemented I'll probably do that.
from feliz.
Off-topic:
I'm using MaterialUI
Are you using Feliz.MaterialUI? Just curious if anyone's using it yet.
from feliz.
Yep! Just started with it, I'd love an example of how to use muiThemeProvider and cssBaseline.
I'm getting an error when I try to use them, but I think I know how to figure it out.
from feliz.
Glad to know someone's using it! You might be helped by this project, which was just converted to Feliz. Feel free to post in the Feliz.MaterialUI repo if you have questions or suggestions 👍
from feliz.
Ah cool, it would be nice to be able to just do:
Looks like I was missing an overload, should be added now!
a custom attribute to set just margin-bottom.
You can already specify margin-bottom
on it's own
style.marginBottom (length.em 1)
from feliz.
Related Issues (20)
- Q: interesting
- add vitest to template
- useElmish vs useReducer HOT 4
- Feedback on missing docs for newcomers HOT 1
- ReactComponentAttribute for props list HOT 2
- Q: Documentation on breaking changes in 2.6? [WAS Updating Feliz.UseListener to Feliz 2.6.0] HOT 4
- CSS overflow-anchor property HOT 1
- Error with Feliz 2.7 HOT 2
- Making UseElmish's dispatch function stable
- Feliz.Markdown escapeHtml doesn't seem to work HOT 1
- UseElmish: Failed to resolve import "use-sync-external-store/shim" HOT 3
- `react-markdown` removes the `escapeHtml` property HOT 1
- Clarification and Potential Improvement on PR #480 useEffectOnce behavior HOT 5
- Expanding Feliz.Rechart HOT 3
- Component created with a forwardRef that has generic type parameters loses state HOT 2
- "Directory import use-sync-external-store\shim is not supported" in UseElmish.fs.js HOT 2
- Use with Elmish documentation is lacking integration HOT 2
- Enhance Handling of F# Record Types as Props in ReactComponent Attribute HOT 4
- Explore if Feliz.CompilerPlugin can support POJO made using `[<ParamObject>]`
- prop.pattern produces invalid html HOT 4
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 feliz.