onDark attribute replacement #601
sun-mota
started this conversation in
Technical Research Documents
Replies: 2 comments
-
|
Proposal 1 does not satisfy design's darkmode strategy. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Team decided go proceed with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
Since svelte 5 treats any attribute beginning with
onas an event handler, our custom attributes that start withonwill no longer work as intended.Goal
"on".onDarkattributeonDark.Relevant Information
Affected components
ondarkattribute auro-button#358 buttonondarkattribute auro-badge#150 badgeondarkattribute auro-banner#90 bannerondarkattribute auro-dialog#81 dialogondarkattribute auro-drawer#95 drawerondarkattribute auro-hyperlink#304 hyperlinkondarkattribute auro-icon#210 iconondarkattribute auro-formkit#1146 FormKitondarkattribute auro-nav#87 navondarkattribute auro-lockup#67 lockupondarkattribute auro-loader#71 loaderondarkattribute auro-slideshow#55 slideshowondarkattribute auro-sidenav#73 sidenavondarkattribute auro-tabs#84 tabsondarkattribute auro-toast#84 toastondarkattribute auro-tokenlist#30 tokenlistReplacement Proposal
1.
surface = "light" | "dark"1.1 Extensibility
Unlike the existing boolean flag (onDark),
surfacecan grow into multiple values without changing the API shape. This allows for future expansion.1.2 Clarity
surface="dark"directly communicates intent that this element is going to be on dark1.3 Potential attribute to be added
inverseSurfaceOnDarkmode = true | falseto support auto-flipping behavior when dark mode is enabled.2.
colormode = "default" | "inverse"1.1 Compatibility with darkmode
Since the design team plans to introduce dark mode, values such as
defaultandinversemap directly to how the component should behave.1.2 Potential value to be added
"persist-light" | "persist-dark"to support the case to disable the flipping in darkmode.Beta Was this translation helpful? Give feedback.
All reactions