Skip to content

Commit ccf2c3b

Browse files
committed
fix: drop the type attribute of the style element
That attribute is deprecated and actually causes a warning.
1 parent a466773 commit ccf2c3b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/pipelines/inline.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl InlineOutput {
127127
pub async fn finalize(self, dom: &mut Document) -> Result<()> {
128128
let html = match self.content_type {
129129
ContentType::Html | ContentType::Svg => self.content,
130-
ContentType::Css => format!(r#"<style type="text/css">{}</style>"#, self.content),
130+
ContentType::Css => format!(r#"<style>{}</style>"#, self.content),
131131
ContentType::Js => format!(r#"<script>{}</script>"#, self.content),
132132
ContentType::Module => format!(r#"<script type="module">{}</script>"#, self.content),
133133
};

src/pipelines/sass.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl SassOutput {
167167
let html = match self.css_ref {
168168
// Insert the inlined CSS into a `<style>` tag.
169169
CssRef::Inline(css) => format!(
170-
r#"<style type="text/css"{attrs}>{css}</style>"#,
170+
r#"<style {attrs}>{css}</style>"#,
171171
attrs = AttrWriter::new(&self.attrs, AttrWriter::EXCLUDE_CSS_INLINE)
172172
),
173173
// Link to the CSS file.

src/pipelines/tailwind_css.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl TailwindCssOutput {
156156
let html = match self.css_ref {
157157
// Insert the inlined CSS into a `<style>` tag.
158158
CssRef::Inline(css) => format!(
159-
r#"<style type="text/css"{attrs}>{css}</style>"#,
159+
r#"<style {attrs}>{css}</style>"#,
160160
attrs = AttrWriter::new(&self.attrs, AttrWriter::EXCLUDE_CSS_INLINE)
161161
),
162162
// Link to the CSS file.

0 commit comments

Comments
 (0)