Skip to content

inlineStyles removes css feature #main:hover { stroke-opacity:0; fill-opacity:0.1; } #1486

@JoKalliauer

Description

@JoKalliauer

Describe the bug
The hovering does not increase the opaticity in Google Chrome , because #main:hover { stroke-opacity:0; fill-opacity:0.1; } is removed.

Input

...
 <style id="style6" type="text/css">
  #main         { font-family:Helvetica,Arial,sans-serif; font-size:16px; stroke-opacity:0; fill-opacity:0.5; cursor:default; }
  #main:hover   { stroke-opacity:0; fill-opacity:0.1; }
  .nofade, .active:hover { stroke-opacity:1; fill-opacity:1; }
  .hidden_text  { font-size:14px; text-anchor:end; fill:none; pointer-events:none; }
 </style>
...
 <g id="main" fill-opacity=".5" stroke-opacity="0" font-family="Helvetica,Arial,sans-serif" font-size="16px">
...
 </g>
....

Output

...
 <style id="style6" type="text/css">
  .active:hover,.nofade{stroke-opacity:1;fill-opacity:1}.hidden_text{font-size:14px;text-anchor:end;fill:none;pointer-events:none}
 </style>
...
 <g fill-opacity=".5" stroke-opacity="0" cursor="default" font-family="Helvetica,Arial,sans-serif" font-size="16">
...
 </g>
....

Desktop (please complete the following information):

  • SVGO Version 2.3.0
  • node --version v14.17.0
  • OS: Fedora 34

copyright

source https://en.wikipedia.org/wiki/File:Comparison_gender_life_expectancy_CIA_factbook.svg

author https://commons.wikimedia.org/wiki/User:Cmglee

license https://creativecommons.org/licenses/by-sa/3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions