rodneyrehm / viewport-units-buggyfill

Making viewport units (vh|vw|vmin|vmax) work properly in Mobile Safari.
MIT License
1.59k stars 151 forks source link

How do you use viewport-units-buggyfill in the pseudo-element? #95

Open airen opened 6 years ago

airen commented 6 years ago

@rodneyrehm ,How do you use viewport-units-buggyfill in the pseudo-element? eg: sometimes, I use pseudo-element to make ICONS.

Input CSS

.icon-book::before {
      content: 'book';
      width: 2vw;
      height: 2vw;
}

Output CSS

.icon-book::before {
   content: 'viewport-units-buggyfill; width: 2vw;height: 2vw;`
}
rodneyrehm commented 6 years ago

Unfortunately that's not possible. The one time I needed to do something similar I added a wrapper element to to work around the issue.

airen commented 6 years ago

Thx @rodneyrehm .