Commit 7f90c882 authored by Michael Iseard's avatar Michael Iseard
Browse files

Rename root style from "theme" to "primary"

parent e5a9deb7
......@@ -139,7 +139,7 @@ export default registerBlockType('iseardmedia/kudos-button', {
}
>
<RichText
className={'kd-transition kd-duration-150 kd-ease-in-out focus:kd-shadow-focus focus:kd-outline-none kd-font-sans kd-text-center kd-text-white kd-leading-normal kd-text-base kd-font-normal kd-normal-case kd-no-underline kd-w-auto kd-h-auto kd-inline-flex kd-items-center kd-select-none kd-py-3 kd-px-5 kd-m-1 kd-rounded-lg kd-cursor-pointer kd-shadow-none kd-border-none kd-bg-theme hover:kd-bg-theme-dark kudos_button_donate'}
className={'kd-transition kd-duration-150 kd-ease-in-out focus:kd-shadow-focus focus:kd-outline-none kd-font-sans kd-text-center kd-text-white kd-leading-normal kd-text-base kd-font-normal kd-normal-case kd-no-underline kd-w-auto kd-h-auto kd-inline-flex kd-items-center kd-select-none kd-py-3 kd-px-5 kd-m-1 kd-rounded-lg kd-cursor-pointer kd-shadow-none kd-border-none kd-bg-primary hover:kd-bg-primary-dark kudos_button_donate'}
style={{backgroundColor: kudos.theme_color}}
formattingControls={[
'bold',
......
......@@ -108,12 +108,12 @@
input {
&:checked + label {
@apply kd-text-white kd-border-transparent #{'!important'};
background-color: var(--kudos-theme-color);
background-color: var(--kudos-theme-primary);
}
&:focus {
+ label {
box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--kudos-theme-color);
box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--kudos-theme-primary);
outline: 2px solid transparent;
}
}
......@@ -123,7 +123,7 @@
.kd-input-group {
input:required ~ label {
@apply kd-text-white kd-border-transparent #{'!important'};
background-color: var(--kudos-theme-color);
background-color: var(--kudos-theme-primary);
}
}
......
module.exports = {
prefix: 'kd-',
important: true,
purge: [
'./src/js/**/*.{js,jsx}',
'./templates/**/*.twig'
],
purge: {
content: [
'./src/js/**/*.{js,jsx}',
'./templates/**/*.twig'
]
},
theme: {
container: {
center: true,
......@@ -32,7 +34,6 @@ module.exports = {
minWidth: {
0: '0',
1: '1em',
min: 'min-content',
full: '100%',
},
spacing: {
......@@ -75,16 +76,16 @@ module.exports = {
700: '#f58d00',
},
green: {
500: '#2ec4b6',
500: '#',
700: '#2bb9ac',
},
modal: '#1a202ccc',
theme: "var(--kudos-theme-color)",
'theme-dark': "var(--kudos-theme-color-dark)",
'theme-darker': "var(--kudos-theme-color-darker)"
primary: "var(--kudos-theme-primary)",
'primary-dark': "var(--kudos-theme-primary-dark)",
'primary-darker': "var(--kudos-theme-primary-darker)"
},
boxShadow: {
focus: '0 0 0 2px #fff, 0 0 0 3.5px var(--kudos-theme-color)',
focus: '0 0 0 2px #fff, 0 0 0 3.5px var(--kudos-theme-primary)',
'button-group': 'inset 0 0 0 1px var(--wp-admin-theme-color);'
},
keyframes: {
......
......@@ -119,7 +119,7 @@
{% if (terms_link) %}
{{ checkbox('avg', __( 'I agree with the %s', 'kudos-donations' ) |
format( '<a class="kd-text-theme hover:kd-text-theme-dark kd-shadow-none kd-underline kd-cursor-pointer kd-ml-1" target="_blank" href=%s>%s</a>.' |
format( '<a class="kd-text-theme hover:kd-text-primary-dark kd-shadow-none kd-underline kd-cursor-pointer kd-ml-1" target="_blank" href=%s>%s</a>.' |
format( terms_link , __( 'terms and conditions', 'kudos-donations' ) )
)) }}
{% endif %}
......
......@@ -7,10 +7,10 @@
{% set extra = '' %}
{% if 'outline' == style %}
{% set style = 'kd-text-theme kd-border kd-border-solid kd-border-theme kd-bg-transparent hover:kd-bg-theme-dark hover:kd-text-white' %}
{% set style = 'kd-text-primary kd-border kd-border-solid kd-border-primary kd-bg-transparent hover:kd-bg-primary-dark hover:kd-text-white' %}
{% endif %}
{% if 'primary' == style %}
{% set style = 'kd-border-none kd-bg-theme hover:kd-bg-theme-dark' %}
{% set style = 'kd-border-none kd-bg-primary hover:kd-bg-primary-dark' %}
{% endif %}
{% if atts.class is defined %}
......
......@@ -8,15 +8,15 @@
{% endif %}
{% if ( 'text' == type or 'email' == type ) %}
{% set focus = 'focus:kd-border-theme' %}
{% set generic = 'kd-cursor-text kd-appearance-none kd-leading-normal kd-bg-transparent kd-border-gray-300 kd-border-2 kd-border-solid focus:kd-border-theme kd-transition-colors kd-duration-150 kd-ease-in-out kd-rounded kd-w-full kd-py-2 kd-px-3 kd-text-base kd-text-gray-700' %}
{% set focus = 'focus:kd-border-primary' %}
{% set generic = 'kd-cursor-text kd-appearance-none kd-leading-normal kd-bg-transparent kd-border-gray-300 kd-border-2 kd-border-solid focus:kd-border-primary kd-transition-colors kd-duration-150 kd-ease-in-out kd-rounded kd-w-full kd-py-2 kd-px-3 kd-text-base kd-text-gray-700' %}
{% set styles = styles | merge([ focus, generic ]) %}
{% endif %}
{% if ( 'radio' == type or 'checkbox' == type ) %}
{% set checked = 'checked:kd-bg-theme' %}
{% set checked = 'checked:kd-bg-primary' %}
{% set focus = 'focus:kd-shadow-focus' %}
{% set generic = 'kd-duration-75 kd-bg-white kd-shadow-inner kd-border kd-border-theme kd-inline-block kd-w-4 kd-h-4 kd-m-2 kd-p-0 kd-align-middle kd-min-w-1 kd-leading-none kd-outline-none kd-text-center kd-clear-none' %}
{% set generic = 'kd-duration-75 kd-bg-white kd-shadow-inner kd-border kd-border-primary kd-inline-block kd-w-4 kd-h-4 kd-m-2 kd-p-0 kd-align-middle kd-min-w-1 kd-leading-none kd-outline-none kd-text-center kd-clear-none' %}
{% set styles = styles | merge([ checked, focus, generic ]) %}
{% endif %}
......@@ -66,7 +66,7 @@
{% macro select(name, placeholder, options, required=true) %}
<label class="kd-inline-block kd-cursor-pointer kd-font-normal kd-mr-2 kd-mt-2 kd-w-full">
<select class="kd-appearance-none kd-leading-normal kd-bg-transparent kd-border-gray-300 kd-border-2 kd-border-solid focus:kd-border-theme kd-transition-colors kd-duration-150 kd-ease-in-out kd-rounded kd-w-full kd-py-2 kd-px-3 kd-text-base kd-text-gray-700"
<select class="kd-appearance-none kd-leading-normal kd-bg-transparent kd-border-gray-300 kd-border-2 kd-border-solid focus:kd-border-primary kd-transition-colors kd-duration-150 kd-ease-in-out kd-rounded kd-w-full kd-py-2 kd-px-3 kd-text-base kd-text-gray-700"
{{ required ? 'required' : '' }}
name="{{ name }}">
<option value=""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment