-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/stij 129: Make inline buttons the default #111
base: develop
Are you sure you want to change the base?
Changes from all commits
8727809
c16ce40
9712800
7c5d231
486b82f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Buttons | ||
There are 3 types of buttons defined: | ||
* Small | ||
* Medium (default) | ||
* Large | ||
|
||
By default buttons are always inline! | ||
That means when you want to create a full width button you will need to use the `btn-block` mixin we provide. | ||
|
||
We provide the some classes to add to elements that need to be styled like buttons: | ||
We also provide a SASS placeholder. | ||
|
||
## Small buttons | ||
* `%btn--small` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we implement two different button classes? This is a bit confusing. Placeholder for extends is ok. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is meant to be backwards compatible. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Jeroen005 can you check if these button classes are still necessary? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Classy is using .button if I'm not mistaking. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah ok. If that is the case we should leave it in for now untill we have time to refactor the basetheme to strip the classy classes and add the styleguide markup |
||
* `.small.btn` | ||
* `.btn--small` | ||
|
||
## Medium buttons | ||
* `%btn--medium` | ||
* `.medium.btn` | ||
* `.btn--medium` | ||
|
||
## Large buttons | ||
* `%btn--large` | ||
* `.large.btn` | ||
* `.btn--large` | ||
|
||
Furthermore to improve semantic HTML we provide SASS mixins to create these buttons. | ||
* `@mixin btn-s;` for small buttons. | ||
* `@mixin btn-m;` for medium buttons (default). | ||
* `@mixin btn-l;` for large buttons. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"title": "Button", | ||
"name": "Button", | ||
"status": "ready", | ||
"default": "button-sm", | ||
"order": 1, | ||
"context": { | ||
"text": "Button" | ||
}, | ||
"variants": [ | ||
{ | ||
"name": "button-sm", | ||
"handle": "button", | ||
"context": { | ||
"modifier": "btn--small" | ||
} | ||
}, | ||
{ | ||
"name": "button-md", | ||
"handle": "md", | ||
"context": { | ||
"modifier": "btn--medium" | ||
} | ||
}, | ||
{ | ||
"name": "button-lg", | ||
"handle": "button-lg", | ||
"context": { | ||
"modifier": "btn--large" | ||
} | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<input type="button" class="btn {{ modifier }}" value="{{ text }}"> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not be better to use the same names for placeholders and the corresponding buttons in Sass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this. What do you think?