Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very minimal decorations support #67

Open
mikolajpp opened this issue Mar 18, 2018 · 7 comments
Open

Very minimal decorations support #67

mikolajpp opened this issue Mar 18, 2018 · 7 comments

Comments

@mikolajpp
Copy link

mikolajpp commented Mar 18, 2018

Currently it is impossible to have anything more complex than a simple color change on mouseOver and other attributes which take decoration attributes.

What is the endgame here, and what is the reasoning that lead to decorations being singled out as opposed to general attributes?

It makes it near impossible in current stylish-elephants to implement pretty standard effects, like border activation and so on, which make for pleasant UI.

@mdgriffith
Copy link
Owner

I'm open to supporting more attributes in mouseOver, please suggest them if you want them!

What do you mean by border activation? Border color is currently supported on mouseOver, though I still need to add support for individual border colors, like border-left-color, etc.

I don't believe it makes sense to support all attributes on mouseOver. Like would events make sense? Or accessibility annotations from Element.Region?

@mikolajpp
Copy link
Author

Well, I tried Border.solid, it seems not included.

I agree there should be restrictions on decorations, so that they are truly decorations. After all we are all trying to have a sane alternative to CSS/HTML hell.

I believe anything look related should be included.

By border activation I meant that nice little effect wherein instead of text underline you use a bottom border for example. In this particular case I guess it could be achieved by selectively changing color, but in general other border customization attributes should be available, otherwise the pressure from users to have "any attributes" available will continue to mount ;-)

@mdgriffith
Copy link
Owner

So, let's get specific about what we're talking about. :) What border related properties would you like to see?

The idea with adding Border.solid to the hover would be to show a border on hover, right, so I think border color actually addresses that.

el 
    [ Border.color transparent
    , mouseOver
          [ Border.color blue
          ]
    ]
    (text "My Text")

Border width is kinda tough because border width will affect the layout within the element. Border style is sorta weird, I'm not sure switching from solid to dashed makes a ton of sense.

I could maybe see shadows being added though.

@mikolajpp
Copy link
Author

For now I will be fully satisfied with border color support.

In the afterthought, I think you are right about not being overzealous in adding properties.
This way we can actually end up with very sensible alternative to HTML/CSS which in addition enforces some sane aesthetic choices. I too can't see much use for change of border style, what I was trying to achieve was actually caused by translating my old CSS habits into stylish-elephants.

@kuon
Copy link

kuon commented Mar 19, 2018

I use mostly transform , opacity and box shadow for button effects (with or without animation) as it does not affect layout and allow for a lot of nice effects. I do it with css at present. But SE should support it eventually.

@neurodynamic
Copy link

I'd be interested in having the border style and the amount of padding be changeable as well. I use these for certain custom inputs and buttons and stuff. Padding example (the buttons).

@Augustin82
Copy link

I was looking to emulate the behaviour of a link (so, underline and possibly change color on hover), and realized I couldn't.
I'd like to be able to (or to be shown a Better Way ;)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants