-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input, select + other form component updates [Rebased] #34
Conversation
…+ `eye-slash`, `chevron down`, `check` for checkbox; Add `checked-option` svg for Option and Menu
… {component}.styles.ts
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -20,8 +20,8 @@ export default css` | |||
font-weight: var(--sl-font-weight-normal); | |||
line-height: var(--sl-line-height-normal); | |||
letter-spacing: var(--sl-letter-spacing-normal); | |||
color: var(--sl-color-neutral-700); | |||
padding: var(--sl-spacing-2x-small) var(--sl-spacing-2x-small); | |||
color: var(--ts-color-text-default); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reservations about using the ts--
variables directly in the Shoelace stylesheets, because then we're kind of creating a circular dependency. As I understand it, we shouldn't need to use those values directly, because we're overriding the Shoelace values with their corresponding ts
values already. Open to discussion on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see -- so we should use --sl-color-neutral-900
here, you mean? I was thinking this makes the code more readable for us, since we know right away what ts-color-text-default
is. But I'm fine to update all these to remove the --ts
variable and replace with the --sl
equivalent.
There are a few places where we had to create our own hard-coded --ts
token rather than overriding an existing --sl
token because the value we wanted kinda fell between two --sl
tokens that we wanted to keep. In those cases, do you think it's okay to reference the --ts
token directly?
Also -- okay with you if I just keep that in mind as the new approach & update these instances in the new branch that I'm working on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's fine to just update in the other branch. I think if we're creating new values, we might want to just create those as --sl
values as well, so we have consistency in our approach across the board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, okay. we have several of these custom -ts
values so i think i will pull this work of updating this into a separate ticket, then? but what you are saying makes sense to me. agree that we should be consistent!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's fine.
src/components/tag/tag.styles.ts
Outdated
@@ -75,7 +75,7 @@ export default css` | |||
|
|||
.tag--small { | |||
font-size: var(--sl-button-font-size-medium); | |||
height: calc(var(--sl-input-height-small) * 0.9); | |||
height: calc(var(--sl-input-height-small) * 0.85715); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to make sure these render OK in different browsers / platforms. I feel like some of them are pickier about how they render odd font sizes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, great call. What do you think if I just did away with the calc
function entirely and just add a variable for the height that we know we want these to be? Feels more straightforward? If that sounds good to you, I'll update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pushed a commit to update the *
by decimal to a -
by a rem value that gives us the same effective height that we want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, although I'm not seeing that reflected here yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great, just a few comments/questions.
@@ -75,21 +75,21 @@ export default css` | |||
|
|||
.tag--small { | |||
font-size: var(--sl-button-font-size-medium); | |||
height: calc(var(--sl-input-height-small) * 0.85715); | |||
height: calc(var(--sl-input-height-small) - 0.25rem); /* 24px */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CrookedGrin -- Here is that change from the *
decimal to -
a rem value! I don't know why github doesn't update the code block near the comment or at least give us the option of seeing the "old version" and the "new version"? 🤷♀️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, weird. Anyway, looks good!
👉 Review app
contributing.md
based on comment from other PRchangelog.md
Changes in this PR
Input
label-tooltip
andcontext-note
slots and attributescurrency
with default prefix and suffix elementsemail
,tel
, andsearch
pill
,filled
, sizesmall
)overrides.css
into componentstyles.ts
fileTextarea
label-tooltip
andcontext-note
slots and attributesfilled
, sizessmall
,large
)overrides.css
into componentstyles.ts
fileSelect
label-tooltip
andcontext-note
slots and attributespill
,filled
, sizesmall
)overrides.css
into componentstyles.ts
fileOption
overrides.css
into componentstyles.ts
fileMenu, Menu Item, Menu Label
overrides.css
into componentstyles.ts
fileMisc
eye
,eye-slash
(used inpassword
Input)x-circle-fill
(used inclearable
Input)chevron-down
(used in Select)checked
(used in Checkbox)checked-option
for use in Option and Menu to show selected options and menu items