Skip to content

Commit ce0ac2e

Browse files
committedFeb 25, 2025
fix(core): broken style types
1 parent 054242c commit ce0ac2e

File tree

1 file changed

+14
-2
lines changed
  • packages/unhead/src/types/schema

1 file changed

+14
-2
lines changed
 

‎packages/unhead/src/types/schema/head.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,34 @@ export type MaybeArray<T> = T | T[]
4646
export type BaseBodyAttr = BaseBodyAttributes
4747
export type BaseHtmlAttr = _HtmlAttributes
4848

49-
export interface BodyAttr extends Omit<BaseBodyAttr, 'class'> {
49+
export interface BodyAttr extends Omit<BaseBodyAttr, 'class' | 'style'> {
5050
/**
5151
* The class global attribute is a space-separated list of the case-sensitive classes of the element.
5252
*
5353
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class
5454
*/
5555
class?: MaybeArray<string> | Record<string, boolean>
56+
/**
57+
* The style attribute contains CSS styling declarations to be applied to the element.
58+
*
59+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style
60+
*/
61+
style?: MaybeArray<string> | Record<string, ResolvableValue<string>>
5662
}
5763

58-
export interface HtmlAttr extends Omit<_HtmlAttributes, 'class'> {
64+
export interface HtmlAttr extends Omit<_HtmlAttributes, 'class' | 'style'> {
5965
/**
6066
* The class global attribute is a space-separated list of the case-sensitive classes of the element.
6167
*
6268
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class
6369
*/
6470
class?: MaybeArray<string> | Record<string, boolean>
71+
/**
72+
* The style attribute contains CSS styling declarations to be applied to the element.
73+
*
74+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style
75+
*/
76+
style?: MaybeArray<string> | Record<string, ResolvableValue<string>>
6577
}
6678

6779
export interface BaseMeta extends Omit<_Meta, 'content'> {

0 commit comments

Comments
 (0)
Please sign in to comment.