Skip to content

Instantly share code, notes, and snippets.

@myfonj
Created August 28, 2019 12:22
Show Gist options
  • Save myfonj/0203ae6f39ccb146a2078866aa2af141 to your computer and use it in GitHub Desktop.
Save myfonj/0203ae6f39ccb146a2078866aa2af141 to your computer and use it in GitHub Desktop.
@-moz-document url-prefix("file:///"), url-prefix("http://"), url-prefix("https://"), url-prefix("data:text/html,"), url-prefix("data:text/html;charset=utf-8,<!DOCTYPE%20html><title>HTML%20sandbox%20") {
/* AGENT_SHEET */
/*
"myfavolours" - global custom colour scheme
http://userstyles.org/styles/2187
BEGIN
*/
/* i really want this to be global */
/*
summary:
- basic background = dark grey
- basic text = light grey
- "semantic" importance = contrast
- unvisited links (and form labels) = aquamarine
- visited links = light green
- form elements, :hover, :focus, and more
latest revisions
2008-08-18: FF3 fix
2010-01-07: minor fixes
2011-11-01: view-source, "progressmeters"
..
2012-08-29: few more "transparent flyout" fixes (for gmail mostly) ([role])
2013-09-18: `window` out, lets see the flashes.
*/
html {
scrollbar-color: #000 #333;
}
/*** init
- setting basic colours / background
- disabling (most of) background images
*/
/* Disabling text-indent will bring back text of most of "graphical" headings
off by default, to comply with "nothing but colours" rule
/on*off/
html *
{ text-indent : 0 !important
}
/* */
html ,
/* background-images
- disable ALL
/on*off/
html *:not(#\0):not(#\0) ,
/* OR
- allow SOME 'buttons'
on*/
html:not(#\0):not(#\0) *:not(:empty):not([class*="icon"]) ,
/* */
html:not(#\0):not(#\0) *:not(:empty):not([class*="icon"]):after ,
html:not(#\0):not(#\0) *:not(:empty):not([class*="icon"]):before
{ background-image : none !important
}
html:not(#\0):not(#\0)
{ background-color : #333 !important
; border-color : #444 !important
}
html:not(#\0):not(#\0) body
{ background-color : transparent !important /* sometimes body is not stretched over whole page height */
; border-color : #666 !important
; color : #ccc !important
}
body#body
{ background-color: #333 !important
}
html:not(#\0):not(#\0) * ,
html:not(#\0):not(#\0) *:after ,
html:not(#\0):not(#\0) *:before
{ background-color : transparent !important
; border-color : #666 !important /* "inherit" is bugged ! */
; color : inherit !important
; text-shadow : none !important
}
/*
what about outline and box-shadow?
*/
/*** semantic blocks
*/
/** top header:
*/
/* - wannabe
*/
html:not(#\0):not(#\0) .head ,
html:not(#\0):not(#\0) .header ,
html:not(#\0):not(#\0) *[id*="title"] ,
html:not(#\0):not(#\0) *[id*="Title"] ,
html:not(#\0):not(#\0) *[id*="head"] ,
html:not(#\0):not(#\0) *[id*="Head"] ,
html:not(#\0):not(#\0) *[class*="header"] ,
html:not(#\0):not(#\0) *[class*="Header"] ,
html:not(#\0):not(#\0) *[id*="hlavicka"] ,
html:not(#\0):not(#\0) *[id*="Hlavicka"] ,
html:not(#\0):not(#\0) *[class*="hlavicka"] ,
html:not(#\0):not(#\0) *[class*="Hlavicka"]
{ background-color : #404040 !important
}
/* - real
*/
header ,
html:not(#\0):not(#\0) #head ,
html:not(#\0):not(#\0) #header ,
html:not(#\0):not(#\0) #top
{ background-color : #222 !important
}
/** navigation ( the 'menu predicting magic' )
*/
/* - wannabe
*/
html:not(#\0):not(#\0) *[id*="nav"] *[class*="page"] ,
html:not(#\0):not(#\0) .navlist a ,
html:not(#\0):not(#\0) .Navlist a ,
html:not(#\0):not(#\0) *.navigation a ,
html:not(#\0):not(#\0) *[id*="menu"] a ,
html:not(#\0):not(#\0) *[id*="Menu"] a ,
html:not(#\0):not(#\0) *[id*="navig"] a ,
html:not(#\0):not(#\0) *[id*="Navig"] a ,
html:not(#\0):not(#\0) *[id*="-nav"] a ,
html:not(#\0):not(#\0) *[id*="-Nav"] a ,
html:not(#\0):not(#\0) *[id$="nav"] a ,
html:not(#\0):not(#\0) *[id$="Nav"] a ,
html:not(#\0):not(#\0) *[class*="menu"] a ,
html:not(#\0):not(#\0) *[class*="Menu"] a ,
html:not(#\0):not(#\0) *[class*="navig"] a ,
html:not(#\0):not(#\0) *[class*="Navig"] a ,
html:not(#\0):not(#\0) *[class*="-nav"] a ,
html:not(#\0):not(#\0) *[class*="-Nav"] a ,
html:not(#\0):not(#\0) *[class$="nav"] a ,
html:not(#\0):not(#\0) *[class$="Nav"] a
{ background-color : #282839 !important
}
/* - real
*/
html:not(#\0):not(#\0) label , /* ! label added, let's see */
html:not(#\0):not(#\0) nav a ,
html:not(#\0):not(#\0) menu a ,
html:not(#\0):not(#\0) #menu a ,
html:not(#\0):not(#\0) #navigation a
{ background-color : #223 !important
}
html:not(#\0):not(#\0) div[class*=menu][class*=vertical]
{ background-color: #334 !important
}
/*
above ID selectors would override below rules
due # selector priority
so that's why this :
*/
html:not(#\0):not(#\0) #menu a:hover ,
html:not(#\0):not(#\0) #navigation a:hover ,
html:not(#\0):not(#\0) *[class*="menu"][class*="item"]:hover
{ background-color : #000 !important
}
/** aside:
*/
/* - wannabe
*/
html:not(#\0):not(#\0) div[id*="side"] ,
html:not(#\0):not(#\0) div[id*="Side"] ,
html:not(#\0):not(#\0) div[class*="side"] ,
html:not(#\0):not(#\0) div[class*="Side"]
{ background-color : #404040 !important
}
/* - real
*/
html:not(#\0):not(#\0) aside ,
html:not(#\0):not(#\0) .aside ,
html:not(#\0):not(#\0) #aside
{ background-color : #444 !important
}
/** footer
*/
html:not(#\0):not(#\0) footer ,
html:not(#\0):not(#\0) div[id*="foot"] ,
html:not(#\0):not(#\0) div[class*="foot"] ,
html:not(#\0):not(#\0) div[id*="paticka"] ,
html:not(#\0):not(#\0) div[class*="paticka"]
{ background-color : #444 !important
}
/** others semantic blocks
( yet unimplemented )
*/
/*
article
{ }
#main
{ }
#content
{ }
section ,
.section
{ }
.divider
{ }
/* */
/** anonymous heading elements
*/
html:not(#\0):not(#\0) *[class*="heading"] ,
html:not(#\0):not(#\0) *[class*="Heading"] ,
html:not(#\0):not(#\0) *[id*="heading"] ,
html:not(#\0):not(#\0) *[id*="Heading"] ,
html:not(#\0):not(#\0) *[class*="nadpis"] ,
html:not(#\0):not(#\0) *[class*="Nadpis"] ,
html:not(#\0):not(#\0) *[id*="nadpis"] ,
html:not(#\0):not(#\0) *[id*="Nadpis"]
{ border-color : #888 !important
; color : #eee !important
}
/*** concrete HTML block elements
*/
/** headers
h1 , h2 , h3 , h4 , h5 , h6
caption , th , lh , dt , legend
*/
html:not(#\0):not(#\0) h1
{ background-color : #000 !important
; border-color : #eee !important
; color : #fff !important
}
html:not(#\0):not(#\0) h2 ,
html:not(#\0):not(#\0) h3 ,
html:not(#\0):not(#\0) h4 ,
html:not(#\0):not(#\0) h5 ,
html:not(#\0):not(#\0) h6 ,
html:not(#\0):not(#\0) caption , /* table h. */
html:not(#\0):not(#\0) thead ,
html:not(#\0):not(#\0) th , /* table-row|column h. */
html:not(#\0):not(#\0) lh , /* list h. html3. how f***ing usefull element. deprecated. */
html:not(#\0):not(#\0) dl dt , /* definition h. */
html:not(#\0):not(#\0) html fieldset legend /* form h. */
{ background-color : #222 !important
; border-color : #999 !important
; color : #eee !important
}
/** other stuff
now they have the same colour;
it would be nice if it was distinguishable simply by colour
*/
html:not(#\0):not(#\0) blockquote ,
html:not(#\0):not(#\0) code ,
html:not(#\0):not(#\0) tt , /* code and tt is inline */
html:not(#\0):not(#\0) xmp ,
html:not(#\0):not(#\0) pre
{ background-color : #404040 !important
}
html:not(#\0):not(#\0) td
{ border-color : #555 !important
}
html:not(#\0):not(#\0) hr
{ background-color : #666 !important
; border-color : #666 !important
; color : #666 !important
}
/*** concrete HTML inline elements
- just colour altered
*/
/** emphasis:
*/
/* - wannabe
*/
html:not(#\0):not(#\0) *[id*="important"] ,
html:not(#\0):not(#\0) *[id*="Important"] ,
html:not(#\0):not(#\0) *[class*="important"] ,
html:not(#\0):not(#\0) *[class*="Important"]
{ border-color : #666 !important
; color : #fff !important
}
/* - wannabe #2
( yes, it is NOT semantic, but this is usefull, trust me ;] )
*/
html:not(#\0):not(#\0) b ,
html:not(#\0):not(#\0) b * ,
html:not(#\0):not(#\0) i ,
html:not(#\0):not(#\0) i *
{ border-color : #555 !important
; color : #eee !important
}
/* - real
*/
html:not(#\0):not(#\0) tt ,
html:not(#\0):not(#\0) var ,
html:not(#\0):not(#\0) em ,
html:not(#\0):not(#\0) em * ,
html:not(#\0):not(#\0) strong ,
html:not(#\0):not(#\0) strong *
{ border-color : #666 !important
; color : #fff !important
}
/*** common "semantic" classes
initally based on WHATWG HTML5 specs draft
("semantic classes" have been rejected)
but here may be very usefull
*/
/** other not-so-common classes
*/
html:not(#\0):not(#\0) .copyright
{ color : #ccc !important
}
html:not(#\0):not(#\0) .error
{ color : #f66 !important
}
html:not(#\0):not(#\0) .warning
{ color : #f99 !important
}
html:not(#\0):not(#\0) .example
{ color : #cff !important
}
html:not(#\0):not(#\0) .issue
{ color : #f99 !important
}
html:not(#\0):not(#\0) .note
{ color : #cff !important
}
html:not(#\0):not(#\0) .search
{ color : #cff !important
}
/** other funny WHATWG stuff
* /
*[irrelevant]
{
}
/* */
/** links and interactive stuff
that is: links, labels and any other form element
with :hover / :active / :focus states
*/
/* tables, lets see */
html:not(#\0):not(#\0) table
{ background-color: #404040 !important
}
html:not(#\0):not(#\0) thead ,
html:not(#\0):not(#\0) tfoot
{ background-color: #333 !important
}
/* "onclick warning"
raising priority
*/
html:not(#\0):not(#\0) body *[onclick]:hover ,
html:not(#\0):not(#\0) body *[ondblclick]:hover ,
html:not(#\0):not(#\0) a[href^='javascript:'] ,
html:not(#\0):not(#\0) a[href='#']
{ background-color : #300 !important
}
/* properly coded label will behave as unvisited link
*/
html:not(#\0):not(#\0) label[for] ,
html:not(#\0):not(#\0) a:link ,
html:not(#\0):not(#\0) a:link *
{ border-color : #399 !important
; color : #9ef !important
}
html:not(#\0):not(#\0) label[for]:focus ,
html:not(#\0):not(#\0) label[for]:hover ,
html:not(#\0):not(#\0) a:link:focus ,
html:not(#\0):not(#\0) a:link:hover
{ background-color : #000 !important
; border-color : #9ef !important
; color : #eff !important
}
html:not(#\0):not(#\0) a:link:focus * ,
html:not(#\0):not(#\0) a:link:hover *
{ border-color : #9ef !important
; color : #eff !important
}
html:not(#\0):not(#\0) a:visited ,
html:not(#\0):not(#\0) a:visited *
{ border-color : #690 !important
; color : #9c3 !important
}
html:not(#\0):not(#\0) a:visited:focus ,
html:not(#\0):not(#\0) a:visited:hover
{ background-color : #000 !important
; border-color : #9c3 !important
; color : #cf9 !important
}
html:not(#\0):not(#\0) a:visited:focus * ,
html:not(#\0):not(#\0) a:visited:hover *
{ border-color : #9c3 !important
; color : #cf9 !important
}
html:not(#\0):not(#\0) a:visited:focus img ,
html:not(#\0):not(#\0) a:visited:hover img
{ outline-width: 1px
; outline-style: solid
; outline-color : #9c3 !important
; color : #cf9 !important
}
/* active link. no matter if visited or not
*/
html:not(#\0):not(#\0) a:active ,
html:not(#\0):not(#\0) a:active *
{ border-color : #600 !important
; color : #f33 !important
}
/** form elems and some IMO neat effects
*/
html:not(#\0):not(#\0) .button ,
html:not(#\0):not(#\0) .tlacitko ,
html:not(#\0):not(#\0) button ,
html:not(#\0):not(#\0) select ,
html:not(#\0):not(#\0) input
{ background-color : #222 !important
}
html:not(#\0):not(#\0) input[type="password"]
{ background-color : #755 !important
}
html:not(#\0):not(#\0) textarea ,
html:not(#\0):not(#\0) input[type="text"] ,
html:not(#\0):not(#\0) input:not([type])
{ background-color : #555 !important
; color: #fff !important
}
html:not(#\0):not(#\0) textarea:hover ,
html:not(#\0):not(#\0) input[type="text"]:hover ,
html:not(#\0):not(#\0) input:not([type]):hover
{
}
html:not(#\0):not(#\0) input:hover ,
html:not(#\0):not(#\0) button:hover ,
html:not(#\0):not(#\0) select:hover ,
html:not(#\0):not(#\0) textarea:hover
{ color : #fff !important
; border-color: #ccc !important
; background-color : #444 !important
}
html:not(#\0):not(#\0) textarea:focus ,
html:not(#\0):not(#\0) input:focus ,
html:not(#\0):not(#\0) textarea:focus ,
html:not(#\0):not(#\0) button:focus
{ background-color : #000 !important
; border-color : #999 !important
; color: #ccc !important
}
html:not(#\0):not(#\0) textarea:focus:hover ,
html:not(#\0):not(#\0) input:focus:hover ,
html:not(#\0):not(#\0) button:focus:hover ,
html:not(#\0):not(#\0) textarea:focus:hover
{ border-color : #fff !important
}
html:not(#\0):not(#\0) input[type="password"]:focus
{ background-color : #300 !important
}
html:not(#\0):not(#\0) input[disabled]
{ color : #888 !important
}
/*** fixes and tweaks
most of them are IMO obsolete
*/
/** FF3 fix, hope it will work
+2008-08-18+
is it still necessary?
+2012-07-12+
yes, it is, again (?)
*/
html:not(#\0):not(#\0) button ,
html:not(#\0):not(#\0) input[type="button"] ,
html:not(#\0):not(#\0) input[type="submit"] ,
html:not(#\0):not(#\0) select ,
html:not(#\0):not(#\0) input:not([type]) ,
html:not(#\0):not(#\0) input[type="text"] ,
html:not(#\0):not(#\0) textarea
{ -moz-appearance : none !important
; background-image: none !important /* these might be also :empty, so thats why this */
}
/** give solid bg to some elems that deserve it
*/
/* dropdowns that was not catched
* by above 'menu predicting magic'
*/
html:not(#\0):not(#\0) *[id*='content'] ,
html:not(#\0):not(#\0) *[class*='content'] ,
html:not(#\0):not(#\0) li:hover li ,
/* wd DOM inspector
*/
html:not(#\0):not(#\0) div[id^=webdeveloper]
{ background-color : #333 !important
}
/* flashblock. bruteforce.
*/
html:not(#\0):not(#\0) div[style~="url(chrome://flashblock/content/flash.png)"]
{ background-color : #630 !important
}
/* last.fm
*/
html:not(#\0):not(#\0) td.quantifier > div ,
html:not(#\0):not(#\0) div.graph > div#tomGraph
{ background-color : #222 !important
}
/* search hilite
*/
html:not(#\0):not(#\0) span#__firefox-findbar-search-id
{ background-color : #9ff !important
}
html:not(#\0):not(#\0) *[class*=block][style*=block] ,
html:not(#\0):not(#\0) *[class*="wrap"] ,
html:not(#\0):not(#\0) *[id*="notify"] ,
html:not(#\0):not(#\0) *[id*="widget"] ,
html:not(#\0):not(#\0) *[id*="pane"] ,
html:not(#\0):not(#\0) *[class*="widget"] ,
html:not(#\0):not(#\0) *[class*="Overlay"][class*="Dialog"] ,
html:not(#\0):not(#\0) *[class*="modal"] ,
html:not(#\0):not(#\0) *[id*="modal"] ,
html:not(#\0):not(#\0) *[class*="dialog"] ,
html:not(#\0):not(#\0) *[id*="wrapper"] ,
html:not(#\0):not(#\0) *[class*="wrapper"] ,
html:not(#\0):not(#\0) *[id*="Wrapper"] ,
html:not(#\0):not(#\0) *[class*="Wrapper"] ,
html:not(#\0):not(#\0) *[id*="tooltip"] ,
html:not(#\0):not(#\0) *[class*="tooltip"] ,
html:not(#\0):not(#\0) *[id*="Tooltip"] ,
html:not(#\0):not(#\0) *[class*="Tooltip"] ,
html:not(#\0):not(#\0) *[id*="popup"] ,
html:not(#\0):not(#\0) *[class*="popup"] ,
html:not(#\0):not(#\0) *[id*="Popup"] ,
html:not(#\0):not(#\0) *[class*="Popup"] ,
html:not(#\0):not(#\0) *[id*="flyout"] ,
html:not(#\0):not(#\0) *[class*="flyout"] ,
html:not(#\0):not(#\0) *[id*="Flyout"] ,
html:not(#\0):not(#\0) *[class*="Flyout"] ,
#pop
{ background-color : #222 !important
}
/*
hovered images: light background
helps with dark graphic text with transparency
*/
html:not(#\0):not(#\0) img:hover
{ background-color: #ccc !important
}
/*
forum.pspad.com
*/
html:not(#\0):not(#\0) .Item.New strong ,
html:not(#\0):not(#\0) span.newmessage
{ color: #f66 !important
}
/*
jquery autocomplete
*/
html:not(#\0):not(#\0) div.ac_results ul[style] ,
/*
gmail, dropdowns ( [role="listbox"]
*/
html:not(#\0):not(#\0) *[role] ,
/*
*/
html:not(#\0):not(#\0) li#imagebox_bigimages > div ,
/*
google top header
*/
html:not(#\0):not(#\0) #tphdr.tphdr ,
/*
google images hover detail
*/
html:not(#\0):not(#\0) #rg_h.rg_hv
{ background-color: #222 !important
}
/*
common progressmeters / progressbars / selected
*/
html:not(#\0):not(#\0) #loading .lpb #lpt ,
/*
gmail listbox selected
div#:sm.ah.aiv[style] > div[role="option"].Jd-AxF.Jd-Je.Je
*/
html:not(#\0):not(#\0) div[role="option"].Jd-axF.Jd-Je.Je ,
/*
gmail focused row (cells)
*/
html:not(#\0):not(#\0) .oZ-x3.xY.GZubNd ,
html:not(#\0):not(#\0) .PF.xY.PE ,
/*
<div class="pas fbQuestionsPollResultsBar" title="Twice?">
<div class="shaded" style="width:25.6%"></div>
*/
html:not(#\0):not(#\0) [style^="width:"][style$="%"] ,
html:not(#\0):not(#\0) [style^="width:"][style$="%"] ,
html:not(#\0):not(#\0) [style^="width:"][style$="%;"] ,
html:not(#\0):not(#\0) [style^="width:"][style$="%;"] ,
html:not(#\0):not(#\0) [class*="progress"][style] ,
html:not(#\0):not(#\0) [width$="%"][style] ,
html:not(#\0):not(#\0) [class*="bar"][style] /* hm */
{ background-color: #000 !important
}
/*
[style*="left:"][style*="top:"]:hover * {
background-color: #333 !important;
}
*/
/** current / active
usefull especially for
- "active" tabs,
- "current" links in menu
*/
/*
jquery autocomplete
*/
html:not(#\0):not(#\0) .ac_results .ac_even.ac_over ,
html:not(#\0):not(#\0) .ac_results .ac_odd.ac_over ,
html:not(#\0):not(#\0) #current ,
html:not(#\0):not(#\0) #selected ,
html:not(#\0):not(#\0) #active ,
html:not(#\0):not(#\0) .current ,
html:not(#\0):not(#\0) .selected ,
html:not(#\0):not(#\0) .active ,
html:not(#\0):not(#\0) .current a ,
html:not(#\0):not(#\0) .selected a ,
html:not(#\0):not(#\0) .active a
{ background-color : #000 !important
; color : #fff !important
}
html:not(#\0):not(#\0) *[id*=Current] ,
html:not(#\0):not(#\0) *[id*=Selected] ,
html:not(#\0):not(#\0) *[id*=Active] ,
html:not(#\0):not(#\0) *[id*=current] ,
html:not(#\0):not(#\0) *[id*=selected] ,
html:not(#\0):not(#\0) *[id*=active] ,
html:not(#\0):not(#\0) *[class*=Current] ,
html:not(#\0):not(#\0) *[class*=Selected] ,
html:not(#\0):not(#\0) *[class*=Active] ,
html:not(#\0):not(#\0) *[class*=current] ,
html:not(#\0):not(#\0) *[class*=selected] ,
html:not(#\0):not(#\0) *[class*=active] ,
html:not(#\0):not(#\0) *[id*=Current] a ,
html:not(#\0):not(#\0) *[id*=Selected] a ,
html:not(#\0):not(#\0) *[id*=Active] a ,
html:not(#\0):not(#\0) *[id*=current] a ,
html:not(#\0):not(#\0) *[id*=selected] a ,
html:not(#\0):not(#\0) *[id*=active] a ,
html:not(#\0):not(#\0) *[class*=Current] a ,
html:not(#\0):not(#\0) *[class*=Selected] a ,
html:not(#\0):not(#\0) *[class*=Active] a ,
html:not(#\0):not(#\0) *[class*=current] a ,
html:not(#\0):not(#\0) *[class*=selected] a ,
html:not(#\0):not(#\0) *[class*=active] a
{ background-color : #111 !important
; color : #eee !important
}
/*
back to transparency
*/
html:not(#\0):not(#\0) div#lbHoverNav a#lbPrev ,
html:not(#\0):not(#\0) div#lbHoverNav a#lbNext ,
/*
FB photo tag boxes
clashes with [style] progressmeters, this is more or less just temporal hotfix
#fbPhotoSnowliftTagBoxes [style] ,
#fbPhotoPageTagBoxes [style] ,
.tagsWrapper .tagBox[style] ,
.stageActions .faceBox ,
*/
html:not(#\0):not(#\0) .tagsWrapper ,
html:not(#\0):not(#\0) div.faceBox[style] ,
html:not(#\0):not(#\0) div.tagBox[style] ,
/*
LH image
*/
html:not(#\0):not(#\0) a.noHrefOverride ,
html:not(#\0):not(#\0) a.noHrefOverride:hover ,
html:not(#\0):not(#\0) a.noHrefOverride:focus ,
/*
fancybox (lightbox) next/prev block links
*/
[id$="overlay"] + [id$="wrap"] > [id$="outer"] > a {
background-color: transparent !important;
}
/*
END
"myfavolours" - global custom colour scheme
http://userstyles.org/styles/2187
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment