-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Allow totally custom styles via 'bsStyle' #988
Comments
It's done, but I will push the PR after |
I think its cool! I do think though that this probably needs to be solved along with the other issue on Style maps, i.e that you can add invalid styles to certain components. if you add a modal style it should be a button style as well for instance. Same with how the |
I am sorry. I did not get the point of what you said 😓 |
I mean the second paragraph in #646 (comment), you can do |
This is just one of a dozen issues 😄 connected with it, and will be addressed with #646 or even after #646. Though you did not answer the question: :) What is the best way ?
|
I think I would add just a section on "working with boostrap classes and variations" that details how to use bsStyle and then how to add custom ones. I like the api you are proposing here, the only thing I think should happen is that custom styles should be scoped to specific components which will go with the other stuff you are working on :) but something like: |
Got it. Then I first refactor API: |
That looks super cool! |
Mentioned this in #306 before noticing it was closed - it'd be nice if there was a way to conditionally set e.g.
Unless I'm missing something, there's currently no falsey value that can be passed in to bsStyle property without generating warnings. |
@chellberg setting it to |
Same here: #646 (comment) |
#1257 is successor of this. |
@jquense forgot to reply, your suggestion did the trick! Thanks so much. |
good |
For the code:
R-B generates markup: (
![btn-undefined](https://cloud.githubusercontent.com/assets/847572/8683320/aa4ad2ca-2a7a-11e5-8445-0666e9fd29ca.png)
'-undefined'
suffix for everycustom
style name)Such will be possible: (for
![custom-styles-mappint](https://cloud.githubusercontent.com/assets/847572/8683345/d6f0ae94-2a7a-11e5-9818-e12865557bfc.png)
bsStyle='facebook'
=>'facebook'
)I will document the ability to use custom suffixes such as
'btn-myCustom'
via:Now it is possible because of #496, but is not documented.
It will address:
this #537 (comment)
this #543 (comment)
and this #306 (comment)
And it will document this: #537 (comment)
custom styles with validation warning
throughbsStyle
property.custom styles with warnings
custom styles without validation warnings
throughbsStyle
property viastyleMaps.addStyle(ComponentName, 'customStyleName')
APIstyleMaps.addStyle()
APIThe text was updated successfully, but these errors were encountered: