Skip to content

Commit

Permalink
Merge pull request #125 from appwrite/tags-input-fix-style
Browse files Browse the repository at this point in the history
Tags Input missing border bug
  • Loading branch information
TorstenDittmann authored Jan 16, 2024
2 parents 7a1fae1 + ca1bf95 commit fd589c6
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 50 deletions.
1 change: 0 additions & 1 deletion packages/ui/src/6-elements/form/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
@forward "helper";
@forward "placeholder";
@forward "text-inputs";
@forward "tags-input";
@forward "password-meter";
@forward "radio-and-checkbox";
@forward "switch";
Expand Down
48 changes: 0 additions & 48 deletions packages/ui/src/6-elements/form/_tags-input.scss

This file was deleted.

42 changes: 42 additions & 0 deletions packages/ui/src/6-elements/form/_text-inputs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -288,4 +288,46 @@ input[type="datetime-local" i]::-webkit-calendar-picker-indicator {
flex:1;
&:empty::before { content: attr(data-placeholder); }
}
}

/* tags input partial */
.tags-input {
@extend .input-text;
min-block-size:pxToRem(40); padding-block:pxToRem(5); padding-inline:pxToRem(15);
display:flex; gap:10px; align-items:center; flex-wrap:wrap;
&-text { all:unset; flex:1; font-size:pxToRem(14); }
&.is-focus {box-shadow: var(--focus-box-shadow); }

/* default not read-only!!! this pseudo-class affect on div element and I need to overwrite this behavior */
&.is-read-only {
#{$theme-dark} &{
--p-bg-color: var(--color-neutral-80);
--p-border-color: var(--color-neutral-60);
.tag {
--tag-bg-color: var(--color-neutral-60);
--tag-text-color: var(--color-neutral-15);
}
}
}

}
.tags {
display:contents;
&-list { display:contents; gap:10px; flex-wrap:wrap; }
}
.input-tag {
--p-bg-color: var(--tag-bg-color, var(--color-neutral-15));
--p-text-color: var(--tag-text-color, var(--color-neutral-60));
display:flex; height:pxToRem(28); gap:6px; align-items:center;
background-color:hsl(var(--p-bg-color)); padding-inline:pxToRem(8); padding-block:pxToRem(6); border-radius:var(--border-radius-xsmall);
color:hsl(var(--p-text-color));
&-delete-button {
aspect-ratio:1 / 1; line-height:1; border-radius:var(--border-radius-xsmall); text-align:center;
[class*="icon"]::before { vertical-align:middle; }
}
&.is-disabled { --p-text-color:var(--color-neutral-20); }
#{$theme-dark} &{
--tag-bg-color: var(--color-neutral-80);
--tag-text-color: var(--color-neutral-20);
}
}
2 changes: 1 addition & 1 deletion packages/ui/src/7-components/_drop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

--p-drop-border-radius: var(--drop-border-radius, var(--border-radius-small));

position:absolute; inset-inline-start:pxToRem(-10); inset-block-end:calc(100% + #{pxToRem(10)});
position:absolute; inset-inline-start:0; inset-block-end:calc(100% + #{pxToRem(10)});
background-color:hsl(var(--p-drop-bg-color)); color:hsl(var(--p-drop-text-color)); padding:0;
border:solid pxToRem(1) hsl(var(--p-drop-border-color)); border-radius:var(--p-drop-border-radius); box-shadow:var(--shadow-small);
min-inline-size: pxToRem(208);
Expand Down

2 comments on commit fd589c6

@vercel
Copy link

@vercel vercel bot commented on fd589c6 Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on fd589c6 Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.