Giter Site home page Giter Site logo

Comments (7)

Zaid-Ajaj avatar Zaid-Ajaj commented on July 19, 2024 1

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.

Zaid-Ajaj avatar Zaid-Ajaj commented on July 19, 2024

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.

Shmew avatar Shmew commented on July 19, 2024

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.

cmeeren avatar cmeeren commented on July 19, 2024

Off-topic:

I'm using MaterialUI

Are you using Feliz.MaterialUI? Just curious if anyone's using it yet.

from feliz.

Shmew avatar Shmew commented on July 19, 2024

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.

cmeeren avatar cmeeren commented on July 19, 2024

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.

Zaid-Ajaj avatar Zaid-Ajaj commented on July 19, 2024

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)

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.