jonkemp / inline-css

Inline css into an html file.
MIT License
429 stars 85 forks source link

Wildcard styles are applied to meta elements in head #121

Open bkilinc opened 1 year ago

bkilinc commented 1 year ago

I used a wildcard style for reset, like this ;

* {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    font-size: 14px;
  }

styles are also applied to all tags in head, and also to html and body tags. like this

<html xmlns="http://www.w3.org/1999/xhtml" style="box-sizing: border-box; font-family: 'Helvetica Neue ..">
<head style="box-sizing: border-box; font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, ...">
<meta name="viewport" content="width=device-width" style="box-sizing: border-box; font-family: 'Helvetic..">
<title style="box-sizing: border-box; font-family: 'Helvetica Neue',...."> 
<!-- .............. -->
</head>
</html>

workaround is using style like this;

body, body * {
    margin: 0;
    padding: 0;
}

but it looks like a bug and should be fixed.