Create consumer button themes
See original GitHub issueIssue Description
As an application developer, I need predefined consumer button themes available so that i can apply it to terra button.
Example:
import Button from 'terra-button';
import 'terra-button/consumer-button-themes.css';
<Button className='consumer-button-default-theme' />
<Button className='consumer-button-concept1-theme' />
Generating Theme CSS
Solution 1: Basic CSS
consumer-button-themes.css
.consumer-button-default-theme {
--color: #123456
--terra-button-active-background-color-default: rgb(--color, 0.2);
--terra-button-active-border-color-default: rgb(--color, 0.5)
--terra-button-active-color-default: --color;
....(all 34 color variables)
}
.consumer-button-concept1-theme {
--color: #adsqew
--terra-button-active-background-color-default: rgb(--color, 0.2);
--terra-button-active-border-color-default: rgb(--color, 0.5)
--terra-button-active-color-default: --color;
....
}
......
Obviously, there is a repeating pattern for generating theme classes.
Solution 2: SCSS
$color-map: (
default: #123456,
concept1: #qwerty,
...
);
@each $color in $color-map {
.consumer-button-#{$color}-theme {
--terra-button-active-background-color-default: rgb($color, 0.2);
--terra-button-active-border-color-default: rgb($color, 0.5)
--terra-button-active-color-default: $color;
....
}
}
Solution 3: PostCSS plugin Need to look into that, would be great if you have an idea.
Issue Type
- New Feature
- Enhancement
- Bug
- Other
Issue Analytics
- State:
- Created 6 years ago
- Comments:22 (22 by maintainers)
Top Results From Across the Web
Building a Clickable Call-to-Action Button for Your Shopify ...
This tutorial will show how to create a section with a customized call-to-action button that can be included on a landing page.
Read more >How to Create Custom Buttons - BeTheme
... tutorial will walk you through the steps of creating custom buttons and managing button styles in BeTheme. ... Then Theme Options and...
Read more >Buttons | UNITED THEMES™
Set your custom button padding in px, em, rem, vw and vh. With these units you can create buttons of every size. Custom...
Read more >Button Design Guide: How to Design Buttons that Convert
The first step to design buttons that get clicked on is to make them actually look like buttons. Calls to action and sharing...
Read more >Buttoning things up: How this premium Shopify theme's button ...
Customizable Shopify theme buttons · Other easy to customize buttons · How to use customizable Shopify theme buttons · Adding rounded corners to...
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
@mhemesath @alex-bezek how about this:
This will be covered in https://github.com/cerner/terra-core/issues/1038