-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: indicator positions are now responsive and accept sm:, md:, etc…
…. prefixes
- Loading branch information
Showing
3 changed files
with
45 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,9 @@ | ||
.indicator { | ||
@apply relative inline-flex; | ||
width: fit-content; | ||
.indicator-item { | ||
& :where(.indicator-item) { | ||
z-index: 1; | ||
@apply absolute transform; | ||
& { | ||
@apply right-0 left-auto top-0 bottom-auto translate-x-1/2 -translate-y-1/2; | ||
} | ||
&.indicator-start { | ||
@apply right-auto left-0 -translate-x-1/2; | ||
} | ||
&.indicator-center { | ||
@apply right-1/2 left-1/2 -translate-x-1/2; | ||
} | ||
&.indicator-end { | ||
@apply right-0 left-auto translate-x-1/2; | ||
} | ||
&.indicator-bottom { | ||
@apply top-auto bottom-0 translate-y-1/2; | ||
} | ||
&.indicator-middle { | ||
@apply top-1/2 bottom-1/2 -translate-y-1/2; | ||
} | ||
&.indicator-top { | ||
@apply top-0 bottom-auto -translate-y-1/2; | ||
} | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.indicator { | ||
& :where(.indicator-item) { | ||
@apply right-0 left-auto top-0 bottom-auto translate-x-1/2 -translate-y-1/2; | ||
} | ||
& :where(.indicator-item.indicator-start) { | ||
@apply right-auto left-0 -translate-x-1/2; | ||
} | ||
& :where(.indicator-item.indicator-center) { | ||
@apply right-1/2 left-1/2 -translate-x-1/2; | ||
} | ||
& :where(.indicator-item.indicator-end) { | ||
@apply right-0 left-auto translate-x-1/2; | ||
} | ||
& :where(.indicator-item.indicator-bottom) { | ||
@apply top-auto bottom-0 translate-y-1/2; | ||
} | ||
& :where(.indicator-item.indicator-middle) { | ||
@apply top-1/2 bottom-1/2 -translate-y-1/2; | ||
} | ||
& :where(.indicator-item.indicator-top) { | ||
@apply top-0 bottom-auto -translate-y-1/2; | ||
} | ||
} | ||
|