From 9f6cda1b66e9e68d4b02f845da10f9b95435d0eb Mon Sep 17 00:00:00 2001 From: Dominik Piatek Date: Thu, 12 May 2022 10:39:05 +0100 Subject: [PATCH 1/2] Remove pi-inline-code in favour of ui-inline-code The former was only used because we didn't yet have an official inline style. --- preview/app/javascript/styles/application.css | 6 ------ preview/app/views/components/icon/_arguments.html.erb | 2 +- preview/app/views/pages/index.html.erb | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/preview/app/javascript/styles/application.css b/preview/app/javascript/styles/application.css index 5dcc521d6..95bc80771 100644 --- a/preview/app/javascript/styles/application.css +++ b/preview/app/javascript/styles/application.css @@ -71,12 +71,6 @@ } @layer components { - .pi-inline-code { - font-size: 0.9375rem; - padding: 0 0.125rem; - @apply font-mono text-cool-black bg-cool-black text-white whitespace-nowrap; - } - .pi-checkered-bg { --size: 0.25rem; --double: calc(var(--size) * 2); diff --git a/preview/app/views/components/icon/_arguments.html.erb b/preview/app/views/components/icon/_arguments.html.erb index a92c97857..7aab91c2c 100644 --- a/preview/app/views/components/icon/_arguments.html.erb +++ b/preview/app/views/components/icon/_arguments.html.erb @@ -1,5 +1,5 @@
-

Display icons. Uses <use> to insert SVG's. Assumes the spritesheet is already present on the page (this can be done with core/load-sprites.js). Takes the following arguments:

+

Display icons. Uses <use> to insert SVG's. Assumes the spritesheet is already present on the page (this can be done with core/load-sprites.js). Takes the following arguments:

<%= render(ParameterTableComponent.new(component_parameters, framework)) %>
diff --git a/preview/app/views/pages/index.html.erb b/preview/app/views/pages/index.html.erb index 2b7f54f51..bcbf5ccad 100644 --- a/preview/app/views/pages/index.html.erb +++ b/preview/app/views/pages/index.html.erb @@ -155,7 +155,7 @@

Typography

Type definitions do not include margin as it can be contextual. Figma and the below list include recommended margins.

-

The below list is created with ui-text-* helpers which include properties beyond the the standard font-size and line-height that text-* includes.

+

The below list is created with ui-text-* helpers which include properties beyond the the standard font-size and line-height that text-* includes.


From ad1f0c84183a21eb40ea3365ed7dca7775844c54 Mon Sep 17 00:00:00 2001 From: Dominik Piatek Date: Thu, 12 May 2022 10:39:56 +0100 Subject: [PATCH 2/2] Add textarea styles --- preview/app/views/pages/index.html.erb | 12 ++++++++++++ src/core/styles/forms.css | 14 ++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/preview/app/views/pages/index.html.erb b/preview/app/views/pages/index.html.erb index bcbf5ccad..8d534bf21 100644 --- a/preview/app/views/pages/index.html.erb +++ b/preview/app/views/pages/index.html.erb @@ -376,6 +376,18 @@
+

Textarea

+ +
+ + +

Example of additional text beneath the textarea.

+
+

Example HTML

diff --git a/src/core/styles/forms.css b/src/core/styles/forms.css index e4c201368..43e7989c6 100644 --- a/src/core/styles/forms.css +++ b/src/core/styles/forms.css @@ -47,4 +47,18 @@ .ui-checkbox-input:checked + .ui-checkbox-styled svg { @apply block; } + + .ui-textarea { + @apply font-sans font-light text-cool-black text-p1; + @apply p-input mb-16; + @apply bg-light-grey border-mid-grey transition-input border rounded block w-full; + @apply hover:bg-white hover:shadow-input hover:border-transparent; + @apply focus:bg-white focus:shadow-input focus:border-transparent focus:outline-gui-focus; + } + + .ui-textarea::placeholder { + /* CSS vars don't work in ::placeholder in Webkit :( */ + /* color: var(--text-dark-grey); */ + color: #76767c; + } }