[v4]: style handling proposal
See original GitHub issueAs we think about a move to v4 i’d like to simplify the way we handle theme variants, sizes and the like.
Right now we have a bunch of complexity around validating all these inputs. It’s a nicety but adds a bunch of complexity and confusion for folks who want to tweak stuff easily.
I propose that we take reactstrap’s approach here and have no specific propType validation for variants, styles, and styles, e.g
I also think that we should maybe take this time to rethink some of the names? maybe
- bsStyle ->
variant
- bsClass ->
variantPrefix
(intentionally verbose, most ppl shouldn’t use it) - bsSize ->
size
(this is maybe problematic b/c of the ns conflict with html inputsize
This should help remove our dependency on runtime propType usage as well.
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (15 by maintainers)
Top Results From Across the Web
Big 4 Professional Services Style Tender / Proposal Template ...
Provides a template and guidance on how to develop a powerful tender, proposal and and bid for your business - to the quality...
Read more >How to Format A Proposal : The Do's and Dont's | RFPIO
Double-spacing makes your proposal document much easier to skim. 4. DO insert paragraphs every 3-5 sentences. Always break up monolithic blocks of text,...
Read more >How to Format a Business Proposal (With Examples)
What is the best proposal format? In this post we outline basic ... You may also be familiar with the style they find...
Read more >New WixBA UI, v4 - WiX Toolset
The WiX Toolset setup's UI is authored using a 'Metro style' fixed dimension ... The proposal is to update the 'look and feel'...
Read more >5-4 Submitting a Responsive Proposal - FDIC
Prepare an effective response to a Request for Proposal. ... that stands a much higher chance of success than a generic cookie-cutter-style proposal....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok current thinking:
we maintain the general
bsClass
,bsStyle
,bsSize
breakdown (but rename them tobootstrapPrefix
,variant
, andsize
). We worry a bit less about uniformity across all components, I don’t think it’s a big deal that things likesblock
orvertical
are technically also variants but different props. There seem to be less of them in general in v4, delegating instead to util classes, anyway.It’s not the “cleanest” but its more inline with how other frameworks handle this stuff, like material-ui@1 and a much easy migration path than cramming them into one. Plus it’s easier to add in validation for folks that want that, and works better for typing i think.
@aaronbeall
The goal right now is to let people do stuff like
<Button bsStyle="custom">
and get the class.btn-custom
, or do something like<Button bsClass="my-btn" bsSize="large">
and get.my-btn-large
.I agree that, when working with stock TWBS, it’d be nice to have type checks on the values, but it is a goal here to support custom extensions of TWBS in a nice way, and it’s nice to have an easy way to follow the prefixed class name convention.
It’s not “pretending”, it’s extending the framework.