-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix(tab-title): tabs center when set to layout='center'
#7026
Changes from 6 commits
3d9bb3b
9b1f151
11758a0
18f63c0
92966a4
4664adb
d0b914d
7c36006
400201a
006dff3
704ff62
de47d0f
e2d3a7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,9 @@ | |
:host([layout="center"]) { | ||
@apply my-0 mx-5 text-center; | ||
flex-basis: theme("spacing.48"); | ||
margin: auto; | ||
.content { | ||
@apply m-auto; | ||
} | ||
} | ||
|
||
:host([position="bottom"]) .container { | ||
|
@@ -190,11 +192,21 @@ | |
} | ||
} | ||
|
||
:host([closable]) { | ||
.content { | ||
padding-inline-start: 1.5rem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @alisonailea @Elijbet are there any tokens we can use as values for these paddings?f There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this padding should be referenced from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me see what design says about the centering approach in general (will determine the padding amount) and yeah that would be the next question. |
||
padding-inline-end: 1.25rem; | ||
} | ||
} | ||
|
||
:host([closable]) .container, | ||
:host([bordered]) .container { | ||
border-block-end-style: unset; | ||
border-inline-start: 1px solid transparent; | ||
border-inline-end: 1px solid transparent; | ||
.close-button { | ||
margin-inline: 0; | ||
} | ||
} | ||
|
||
:host([closable][position="bottom"]) .container, | ||
|
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.
given that there's no difference between
margin: auto
and@apply m-auto
I'd recommend usingmargin: auto
it's more readableThere 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.
Since we're using tailwind for now, it makes sense to stick to tailwind classes if they are available, for consistency. This is what we've been doing so far. Also, overlapping uses of tailwind and regular css props might create oversight doubling use of both by accident.
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.
Agreed, lets keep tailwind for now for consistency. Hopefully we can remove tailwind in the future.