Я работаю над проектом Livewire, пытаюсь применить некоторую конфигурацию темы попутного ветра, но это совершенно не имеет смысла.
Это моя конфигурация Tailwind:
< предварительно>
Код: Выделить всё
theme: {
extend: {
fontFamily: {
sans: ['Figtree', ...defaultTheme.fontFamily.sans],
},
colors: {
'blue': {
light: '#bae6fd',
DEFAULT: '#38bdf8',
dark: '#0369a1'
},
'red': '#be123c'
}
},
}
Код: Выделить всё
@props(['color' => 'gray'])
@php
$classes = 'bg-' . $color . ' hover:bg-' . $color . '-dark inline-flex items-center
px-3 py-2 border-transparent rounded-md font-semibold text-xs text-white
uppercase tracking-widest focus:outline-none focus:ring-2 focus:ring-
indigo-500 focus:ring-offset-2 transition ease-in-out duration-150'
@endphp
merge([
'type' => 'submit',
'class' => $classes
]) }}>
{{ $slot }}
Код: Выделить всё
{{ __('Edit') }}
- run : background white, style classes do not work
Код: Выделить всё
npm run build - run again: style properties picked up and works as expected
Код: Выделить всё
npm run build - run it again: stops working, background is white and no hover effect is applied
- change the button's color property to red and run : it works, but no hover
Код: Выделить всё
npm run build - change it back to blue and run command: doesn't work , it completely stopped recognizing the blue theme colors
- change to red and run command: works
..... - at some point it stops working even with the red color, hard to keep track of the behaviour.
Any suggestion and information is much appreciated.
Источник: https://stackoverflow.com/questions/781 ... d-behavior
Мобильная версия