From 0df3ba3067769ce76986609c1383907ea0c2f1de Mon Sep 17 00:00:00 2001 From: xaralis <filip.varecha@fragaria.cz> Date: Mon, 4 Jan 2021 10:21:31 +0100 Subject: [PATCH] feat: more flexible form control spacing, some text utils whitelisted --- source/css/molecules/form-field.pcss | 17 ++++++++++++++--- tailwind.config.js | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/source/css/molecules/form-field.pcss b/source/css/molecules/form-field.pcss index 3f7d6f8..22f2aaf 100644 --- a/source/css/molecules/form-field.pcss +++ b/source/css/molecules/form-field.pcss @@ -17,14 +17,25 @@ box-shadow: inset 0 2px 6px 0 rgba(0,0,0,.05); } - &, - &--row-items { + /* Allow bypass defualt positioning */ + &:not(.form-field__wrapper--freeform) { .form-field__control + .form-field__control { @apply ml-4; } } - &--col-items { +} + +@responsive { + .form-field__wrapper--row-items { + @apply flex-row; + + .form-field__control + .form-field__control { + @apply ml-4 mt-0; + } + } + + .form-field__wrapper--col-items { @apply flex-col; .form-field__control + .form-field__control { diff --git a/tailwind.config.js b/tailwind.config.js index a53158e..86fbba2 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -36,6 +36,8 @@ module.exports = { /^((sm|md|lg|xl)\:)?head-*/, /^((sm|md|lg|xl)\:)?clearfix/, /opacity-*/, + /^truncate/, + /^break-*/, /^duration-*/, /^max-w-*/, /ico--*/, -- GitLab