-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply BEM refactoring to Link and LinkButton (#7124)
- Loading branch information
Showing
60 changed files
with
420 additions
and
703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
packages/components/src/components/@shared/_kol-link-mixin.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@import 'mixins'; | ||
@import '../tooltip/style'; | ||
|
||
@mixin kol-link-styles($block-classname) { | ||
@layer kol-component { | ||
:host { | ||
// Causing linebreak, when removed | ||
display: inline-block; | ||
} | ||
|
||
.#{$block-classname} { | ||
$root: &; | ||
|
||
font-size: rem(16); | ||
align-items: baseline; | ||
display: inline-flex; | ||
place-items: center; | ||
text-align: left; | ||
text-decoration-line: none; | ||
|
||
&__text { | ||
.span-label { | ||
text-decoration-line: underline; | ||
|
||
@at-root #{$root}:is(:focus, :hover):not([aria-disabled], [disabled]) & { | ||
text-decoration-thickness: 0.2em; | ||
} | ||
} | ||
} | ||
|
||
&__icon { | ||
display: inline-flex; | ||
margin-left: rem(8); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import '../@shared/mixins'; | ||
@import '../style'; | ||
@import '../link'; | ||
@import '../@shared/kol-link-mixin'; | ||
|
||
@include kol-link-styles('kol-button'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 14 additions & 14 deletions
28
packages/components/src/components/link-button/test/__snapshots__/snapshot.spec.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.