Skip to content

Instantly share code, notes, and snippets.

@atomicpages
Created October 22, 2020 20:02
Show Gist options
  • Save atomicpages/906180b15bbf58b2375321bc37f37e70 to your computer and use it in GitHub Desktop.
Save atomicpages/906180b15bbf58b2375321bc37f37e70 to your computer and use it in GitHub Desktop.
IE-friendly progress bar CSS
// super small progress bar styles
// recommended to be used with autoprefixer
// for the sake of consistency
$color: pink;
$whitespaceColor: #ffeeee;
progress {
appearance: none;
border: none;
background-size: auto;
height: 10px;
// progress bar color for IE
color: $color;
&,
&[aria-valuenow],
&::-webkit-progress-bar {
// normalize white space color
background: $whitespaceColor !important;
}
&[aria-valuenow]:before,
&::-webkit-progress-value {
background: $color;
}
// separate moz styles otherwise bar defaults inherited color
// on chrome
&::-moz-progress-bar {
background: $color;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment