Last active
May 17, 2019 10:07
-
-
Save pbhj/6065ca4ad64fc71fdc2dfd98e322dd9a to your computer and use it in GitHub Desktop.
modify date format on stackoverflow and stackexchange sites using userContent.css for Firefox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Please share improvements here or on StackOverflow and add a link here. | |
* Please upvote https://meta.stackoverflow.com/questions/288674/custom-date-format/385090#385090 if you agree that | |
* users should have a choice of date format available. | |
* | |
* - see https://developer.mozilla.org/en-US/docs/Web/CSS/@document | |
* - https://www.regextester.com/ may be useful too, but careful of the double escaping! | |
* keywords: date format, date display, stackoverflow, stackexchange, css, script | |
*/ | |
/* this doesn't work -> @-moz-document domain(stackoverflow.com) domain(stackexchange.com) */ | |
@-moz-document regexp('.*(askubuntu|stackoverflow|stackexchange)\\.com/?.*') | |
{ | |
span.relativetime { overflow: hidden; color:#fff; } | |
span.relativetime::before { color:#333; | |
content: attr(title) ' '; | |
width: 50%; | |
display:inline-block; | |
height:1.1em; overflow: hidden; | |
white-space: pre-wrap; | |
} | |
span.relativetime-clean { color:#fff; } | |
span.relativetime-clean::before { color:#333; | |
font-weight: bold; | |
content: ' ' attr(title) ' '; | |
display:inline-block; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you make improvements please post them back in a comment.