0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-31 23:31:30 -05:00

feat: add extendable CSSProperties interface (#9587)

* feat: add extendable `CSSProperties` interface

* Update .changeset/slow-kiwis-own.md

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
This commit is contained in:
Jenna Smith 2024-01-03 14:39:17 +00:00 committed by GitHub
parent fe719e27a8
commit da307e4a08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Adds a `CSSProperties` interface that allows extending the style attribute

View file

@ -499,6 +499,15 @@ declare namespace astroHTML.JSX {
KebabCSSDOMProperties & DOMCSSProperties & AllCSSProperties
>;
interface CSSProperties extends StyleObject {
/**
* Extend namespace to add properties or an index signature of your own.
*
* For more information, visit:
* https://docs.astro.build/en/guides/typescript/#built-in-html-attributes
*/
}
interface HTMLAttributes extends AriaAttributes, DOMAttributes, AstroBuiltinAttributes {
// Standard HTML Attributes
accesskey?: string | undefined | null;
@ -547,7 +556,7 @@ declare namespace astroHTML.JSX {
popover?: boolean | string | undefined | null;
slot?: string | undefined | null;
spellcheck?: 'true' | 'false' | boolean | undefined | null;
style?: string | StyleObject | undefined | null;
style?: string | CSSProperties | undefined | null;
tabindex?: number | string | undefined | null;
title?: string | undefined | null;
translate?: 'yes' | 'no' | '' | undefined | null;