uBlock/src/css/popup.css

541 lines
13 KiB
CSS
Raw Normal View History

2014-08-03 06:08:13 +02:00
body {
background-color: white;
2014-08-03 06:08:13 +02:00
border: 0;
float: left;
margin: 0;
2015-09-25 14:29:52 +02:00
opacity: 1;
2015-03-25 15:12:56 +01:00
overflow: hidden;
padding: 0;
white-space: nowrap;
2014-08-03 06:08:13 +02:00
}
body.fullsize {
overflow: auto;
}
2015-04-24 16:55:11 +02:00
/**
https://github.com/gorhill/uBlock/issues/83
.portrait = portrait mode = width is constrained = optimize layout accordingly.
*/
body.portrait {
width: 100%;
}
2015-02-06 23:42:09 +01:00
h2 {
background-color: #eee;
2014-08-03 06:08:13 +02:00
border: 0;
2015-02-06 23:42:09 +01:00
color: #666;
2016-11-05 19:48:42 +01:00
cursor: pointer;
font-size: 100%;
2015-02-06 23:42:09 +01:00
font-weight: normal;
2016-11-05 19:48:42 +01:00
margin: 1em 0 0.8em 0;
padding: 0.2em;
text-align: center;
2014-08-03 06:08:13 +02:00
}
2015-02-06 23:42:09 +01:00
h2:nth-of-type(1) {
margin-top: 0;
}
2014-08-03 06:08:13 +02:00
a {
color: inherit;
text-decoration: none;
}
2014-12-25 14:53:30 +01:00
:focus {
2014-08-03 06:08:13 +02:00
outline: 0;
}
2014-12-25 14:53:30 +01:00
#gotoPrefs {
2015-04-07 18:05:38 +02:00
background-color: #444;
2014-12-25 14:53:30 +01:00
border: 0;
2015-04-17 13:54:36 +02:00
color: #bbb;
2015-04-07 18:05:38 +02:00
cursor: pointer;
display: block;
2016-11-05 19:48:42 +01:00
font-size: 85%;
line-height: 1.2;
2015-04-07 18:05:38 +02:00
margin: 0;
2016-11-05 19:48:42 +01:00
padding: calc(0.1em + 1px) 0;
2016-01-03 01:58:08 +01:00
position: relative;
2014-12-25 14:53:30 +01:00
text-align: center;
}
2014-08-03 06:08:13 +02:00
#version {
2016-11-05 19:48:42 +01:00
font-size: 90%;
font-weight: normal;
}
2016-01-03 01:58:08 +01:00
#gotoPrefs > span:nth-of-type(3) {
opacity: 0.5;
2016-01-03 01:58:08 +01:00
position: absolute;
2016-11-05 19:48:42 +01:00
top: 50%;
transform: translate(0, -50%);
2016-01-03 01:58:08 +01:00
}
body[dir="ltr"] #gotoPrefs > span:nth-of-type(3) {
left: 3px;
}
body[dir="rtl"] #gotoPrefs > span:nth-of-type(3) {
right: 3px;
}
body[dir="ltr"] #panes {
direction: rtl;
}
body[dir="rtl"] #panes {
direction: ltr;
}
body, #panes {
text-align: right; /* this helps the popup render better at "intermediate" widths */
}
2015-04-24 16:55:11 +02:00
#panes > div {
display: inline-block;
2014-12-30 22:36:29 +01:00
position: relative;
vertical-align: top;
}
2015-04-24 16:55:11 +02:00
body.portrait #panes > div {
display: block;
width: 100%;
2015-04-24 16:55:11 +02:00
}
body[dir="ltr"] #panes > div {
direction: ltr;
}
body[dir="rtl"] #panes > div {
direction: rtl;
}
#panes > div:nth-of-type(2) {
font-family: "Noto Sans", sans-serif;
2015-03-15 14:00:30 +01:00
overflow-y: auto;
2014-12-30 22:36:29 +01:00
overflow-x: hidden;
2016-11-05 19:48:42 +01:00
width: 24em;
}
2015-04-24 16:55:11 +02:00
/**
Scroll bar to the left.
*/
body[dir="ltr"] #panes > div:nth-of-type(2) {
2015-04-24 16:55:11 +02:00
direction: rtl;
2015-03-27 23:34:15 +01:00
margin-right: 1px;
}
2015-04-24 16:55:11 +02:00
/**
Scroll bar to the right.
Firefox bug: when popup is rendered inside hamburger menu panel, Firefox is
unable to render the scroll bar to the left.
Maybe <https://bugzilla.mozilla.org/show_bug.cgi?id=1139306>?
*/
body[dir="rtl"] #panes > div:nth-of-type(2),
body.portrait[dir="ltr"] #panes > div:nth-of-type(2) {
direction: ltr;
2015-03-27 23:34:15 +01:00
margin-left: 1px;
2014-12-30 22:36:29 +01:00
}
#panes:not(.dfEnabled) > div:nth-of-type(2) {
display: none;
}
#panes > div:nth-of-type(1) {
2016-11-05 19:48:42 +01:00
min-width: 11em;
2015-03-27 18:00:55 +01:00
padding: 0;
2014-08-03 06:08:13 +02:00
}
p {
text-align: center;
white-space: nowrap;
2014-08-03 06:08:13 +02:00
}
2016-11-05 19:48:42 +01:00
.fa {
font-size: 120%;
}
2015-02-06 23:42:09 +01:00
#switch {
margin: 8px 0;
}
2014-08-03 06:08:13 +02:00
#switch .fa {
2015-02-10 00:24:18 +01:00
color: #0046ff;
2014-08-03 06:08:13 +02:00
cursor: pointer;
2016-11-05 19:48:42 +01:00
font-size: 700%;
margin: 0;
2014-08-03 06:08:13 +02:00
}
#switch .fa:hover {
opacity: 0.9;
}
2015-02-09 21:24:01 +01:00
body.off #switch .fa {
2014-08-03 06:08:13 +02:00
color: #ccc;
}
#page-blocked {
2016-11-05 19:48:42 +01:00
font-size: 1.25em;
2014-08-03 06:08:13 +02:00
}
2015-02-06 23:42:09 +01:00
.statName {
2015-04-16 16:45:20 +02:00
color: #888;
2016-11-05 19:48:42 +01:00
font-size: 85%;
2016-11-09 06:49:50 +01:00
margin: 0.8em 0.2em 0.4em 0.2em;
2015-02-06 23:42:09 +01:00
text-align: center;
2014-08-03 06:08:13 +02:00
}
2015-02-06 23:42:09 +01:00
.statValue {
margin: 0;
2014-08-03 06:08:13 +02:00
text-align: center;
}
.tool {
color: #aaa;
cursor: pointer;
display: none;
2014-11-30 03:38:55 +01:00
unicode-bidi: embed;
2014-08-03 06:08:13 +02:00
}
.tool.enabled {
display: inline;
}
.tool:hover {
color: #444;
}
2015-03-27 18:00:55 +01:00
#extraTools {
background-color: #eee;
border: 0;
color: #aaa;
2016-11-05 19:48:42 +01:00
margin: 0.8em 0 0 0;
padding: 4px 0;
2015-03-27 18:00:55 +01:00
text-align: center;
}
#extraTools > span {
cursor: pointer;
2016-11-05 19:48:42 +01:00
font-size: 1.2em;
margin: 0 0.4em;
2015-03-27 18:00:55 +01:00
position: relative;
}
#extraTools > span > span.badge {
2016-01-04 16:48:28 +01:00
color: #222;
2016-02-02 15:51:45 +01:00
bottom: -1px;
2016-11-05 19:48:42 +01:00
font: x-small sans-serif;
position: absolute;
}
2015-04-05 20:44:41 +02:00
body[dir="ltr"] #extraTools > span > span.badge {
left: 100%;
2015-04-05 20:44:41 +02:00
}
body[dir="rtl"] #extraTools > span > span.badge {
right: 100%;
2015-04-05 20:44:41 +02:00
}
#extraTools > span.on > span:last-of-type {
2015-03-27 18:00:55 +01:00
color: #e00;
2016-11-05 19:48:42 +01:00
font-size: 1.1em;
2015-03-27 18:00:55 +01:00
left: 0;
position: absolute;
text-align: center;
top: 0;
width: 100%;
}
#extraTools > span.on > span:last-of-type:after {
2015-03-27 18:00:55 +01:00
content: '\2715';
}
2015-04-15 16:47:59 +02:00
#extraTools > span:hover {
color: #444;
}
2015-01-10 17:23:28 +01:00
#refresh {
background-color: #ffe;
2015-04-24 14:36:19 +02:00
border: 1px solid #ddc;
2015-01-10 17:23:28 +01:00
border-radius: 4px;
color: #888;
cursor: pointer;
display: none;
2015-12-13 06:56:30 +01:00
font-size: 3.5em;
2015-01-10 17:23:28 +01:00
left: 4px;
2015-04-24 14:36:19 +02:00
line-height: 1;
2015-01-10 17:23:28 +01:00
padding: 4px 8px;
position: absolute;
right: 4px;
text-align: center;
}
body.dirty #refresh {
display: block;
}
body.dirty #refresh:hover {
color: black;
}
2015-04-05 20:44:41 +02:00
#tooltip {
background-color: #ffffee;
border: 1px solid gray;
border-radius: 3px;
box-shadow: 1px 1px 3px gray;
box-sizing: border-box;
color: black;
cursor: pointer;
direction: ltr;
2015-04-05 20:44:41 +02:00
font: 12px sans-serif;
left: 5%;
line-height: 130%;
margin: 0.5em 0;
opacity: 0;
padding: 4px 6px;
pointer-events: none;
2015-12-13 06:56:30 +01:00
position: absolute;
2015-04-05 20:44:41 +02:00
text-align: center;
visibility: hidden;
white-space: pre-line;
width: 90%;
z-index: 100;
}
body[dir="rtl"] #tooltip {
direction: rtl;
}
2015-04-05 20:44:41 +02:00
#tooltip.show {
transition: opacity 0.15s 0.5s;
-webkit-transition: opacity 0.15s 0.5s;
2015-04-05 20:44:41 +02:00
visibility: visible;
opacity: 1;
}
#firewallContainer {
2014-10-06 20:02:44 +02:00
border: 0;
2016-11-05 19:48:42 +01:00
font-size: 85%;
margin: 0;
2014-10-06 20:02:44 +02:00
padding: 0;
text-align: right;
2014-10-06 20:02:44 +02:00
}
#firewallContainer > div {
background-color: #e6e6e6;
2014-10-06 20:02:44 +02:00
border: 0;
direction: ltr;
margin: 0;
2014-10-06 20:02:44 +02:00
padding: 0;
2014-12-30 22:36:29 +01:00
}
#firewallContainer > div:hover {
2014-12-30 22:36:29 +01:00
background-color: #f0f0f0;
}
2016-11-05 19:48:42 +01:00
#firewallContainer > div:first-child ~ div:not([class]) {
display: none;
}
2015-02-17 03:15:09 +01:00
#firewallContainer.minimized > div.isSubDomain {
display: none;
}
#firewallContainer > div > span {
background-color: transparent;
border: none;
2016-11-05 19:48:42 +01:00
border-bottom: 1px solid white;
2014-10-06 20:02:44 +02:00
box-sizing: border-box;
-moz-box-sizing: border-box;
color: #000;
display: inline-block;
2016-11-05 19:48:42 +01:00
height: 1.9em;
line-height: 1.9em;
overflow: hidden;
position: relative;
2016-11-05 19:48:42 +01:00
vertical-align: top;
2014-10-06 20:02:44 +02:00
}
2015-02-17 03:15:09 +01:00
#firewallContainer > div:nth-of-type(1) > span:nth-of-type(1) {
cursor: pointer;
}
#firewallContainer > div > span:nth-of-type(1) {
padding-right: 2px;
2015-03-25 15:12:56 +01:00
position: relative;
2015-01-01 06:16:02 +01:00
text-overflow: ellipsis;
2016-11-05 19:48:42 +01:00
width: calc(100% - 4em);
2014-10-06 20:02:44 +02:00
}
2016-11-05 19:48:42 +01:00
#firewallContainer > div > span:nth-of-type(2) {
display: none;
}
#firewallContainer > div > span:nth-of-type(1) ~ span {
border-left: 1px solid white;
width: 4em;
2014-10-06 20:02:44 +02:00
}
2015-02-17 03:15:09 +01:00
#firewallContainer > div > span:nth-of-type(3),
#firewallContainer > div > span:nth-of-type(4) {
color: #444;
2014-12-25 14:53:30 +01:00
text-align: center;
2014-10-06 20:02:44 +02:00
}
2015-02-17 03:15:09 +01:00
#firewallContainer > div > span:nth-of-type(4) {
display: none;
}
#firewallContainer > div.isDomain > span:nth-of-type(1) {
2014-12-30 22:36:29 +01:00
font-weight: bold;
}
2015-02-25 13:26:13 +01:00
#firewallContainer > div:nth-of-type(1) > span:nth-of-type(1):before {
color: #aaa;
content: '\2012';
padding-right: 0.25em;
}
#firewallContainer.minimized > div:nth-of-type(1) > span:nth-of-type(1):before {
content: '+';
}
2015-02-17 03:15:09 +01:00
#firewallContainer.minimized > div.isDomain > span:nth-of-type(3) {
display: none;
}
#firewallContainer.minimized > div.isDomain > span:nth-of-type(4) {
display: inline-block;
}
2016-11-05 19:48:42 +01:00
#firewallContainer > div > span[data-acount]:before,
#firewallContainer > div > span[data-bcount]:after {
position: absolute;
}
#firewallContainer > div > span[data-acount]:before {
left: 0.1em;
}
#firewallContainer > div > span[data-acount="1"]:before {
content: '+';
}
#firewallContainer > div > span[data-acount="2"]:before {
content: '++';
}
#firewallContainer > div > span[data-acount="3"]:before {
content: '+++';
}
#firewallContainer > div > span[data-bcount]:after {
right: 0.1em;
}
#firewallContainer > div > span[data-bcount="1"]:after {
content: '\2212';
}
#firewallContainer > div > span[data-bcount="2"]:after {
content: '\2212\2212';
}
#firewallContainer > div > span[data-bcount="3"]:after {
content: '\2212\2212\2212';
}
body.advancedUser #firewallContainer > div > span:nth-of-type(1) {
width: calc(100% - 8em);
}
body.advancedUser #firewallContainer > div > span:nth-of-type(2) {
display: inline-block;
}
body.advancedUser #firewallContainer > div:first-child ~ div:not([class]) {
display: block;
}
body.advancedUser #firewallContainer > div > span:nth-of-type(1) ~ span {
cursor: pointer;
}
2015-04-24 16:55:11 +02:00
/**
Small coloured label at the left of a row
*/
2015-03-25 15:12:56 +01:00
#firewallContainer > div.allowed > span:nth-of-type(1):before,
#firewallContainer > div.blocked > span:nth-of-type(1):before,
#firewallContainer.minimized > div.isDomain.totalAllowed > span:nth-of-type(1):before,
#firewallContainer.minimized > div.isDomain.totalBlocked > span:nth-of-type(1):before {
box-sizing: border-box;
content: '';
display: inline-block;
height: 100%;
left: 0;
opacity: 0.4;
position: absolute;
width: 7px;
}
2015-04-24 16:55:11 +02:00
/**
Source for color-blind color scheme from https://github.com/WyohKnott:
https://github.com/chrisaljoudi/uBlock/issues/467#issuecomment-95177219
*/
2015-03-25 15:12:56 +01:00
#firewallContainer > div.allowed > span:nth-of-type(1):before,
#firewallContainer.minimized > div.isDomain.totalAllowed > span:nth-of-type(1):before {
background-color: rgb(0, 160, 0);
}
#firewallContainer.colorBlind > div.allowed > span:nth-of-type(1):before,
#firewallContainer.colorBlind.minimized > div.isDomain.totalAllowed > span:nth-of-type(1):before {
background-color: rgb(255, 194, 57);
}
2015-03-25 15:12:56 +01:00
#firewallContainer > div.blocked > span:nth-of-type(1):before,
#firewallContainer.minimized > div.isDomain.totalBlocked > span:nth-of-type(1):before {
background-color: rgb(192, 0, 0);
}
#firewallContainer.colorBlind > div.blocked > span:nth-of-type(1):before,
#firewallContainer.colorBlind.minimized > div.isDomain.totalBlocked > span:nth-of-type(1):before {
background-color: rgb(0, 19, 110);
}
2015-03-25 15:12:56 +01:00
#firewallContainer > div.allowed.blocked > span:nth-of-type(1):before,
#firewallContainer.minimized > div.isDomain.totalAllowed.totalBlocked > span:nth-of-type(1):before {
background-color: rgb(192, 160, 0);
2014-10-06 20:02:44 +02:00
}
/* Rule cells */
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer > div > span.aRule {
background-color: rgba(0, 160, 0, 0.3);
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer.colorBlind > div > span.aRule {
background-color: rgba(255, 194, 57, 0.4);
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer > div > span.bRule {
background-color: rgba(192, 0, 0, 0.3);
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer.colorBlind > div > span.bRule {
background-color: rgba(0, 19, 110, 0.4);
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer > div > span.nRule {
background-color: rgba(108, 108, 108, 0.3);
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer.colorBlind > div > span.nRule {
background-color: rgba(96, 96, 96, 0.4);
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer > div > span.ownRule {
color: white;
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer > div > span.aRule.ownRule {
background-color: rgba(0, 160, 0, 1);
2014-10-06 20:02:44 +02:00
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer.colorBlind > div > span.aRule.ownRule {
background-color: rgba(255, 194, 57, 1);
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer > div > span.bRule.ownRule {
background-color: rgba(192, 0, 0, 1);
2014-10-06 20:02:44 +02:00
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer.colorBlind > div > span.bRule.ownRule {
background-color: rgba(0, 19, 110, 1);
}
2016-11-05 19:48:42 +01:00
body.advancedUser #firewallContainer > div > span.nRule.ownRule {
background-color: rgba(108, 108, 108, 1);
}
#actionSelector {
bottom: 0;
left: 0;
position: absolute;
top: 0;
2016-11-05 19:48:42 +01:00
width: 4em;
z-index: 1;
}
#actionSelector > span {
display: inline-block;
2016-11-05 19:48:42 +01:00
height: 100%;
opacity: 0.2;
2016-11-05 19:48:42 +01:00
}
#actionSelector > span:nth-of-type(1) {
width: 33%;
}
#actionSelector > span:nth-of-type(2) {
width: 33.5%;
}
#actionSelector > span:nth-of-type(3) {
width: 33.5%;
}
#actionSelector > span:hover {
opacity: 0.75;
}
#actionSelector > span:nth-of-type(1) {
background-color: rgb(0, 160, 0);
}
#actionSelector.colorBlind > span:nth-of-type(1) {
background-color: rgb(255, 194, 57);
}
#actionSelector > span:nth-of-type(2) {
background-color: rgb(108, 108, 108);
}
#actionSelector > span:nth-of-type(3) {
background-color: rgb(192, 0, 0);
}
#actionSelector.colorBlind > span:nth-of-type(3) {
background-color: rgb(0, 19, 110);
}
2015-02-09 21:24:01 +01:00
2015-04-24 14:36:19 +02:00
#rulesetTools {
background-color: transparent;
border: 0;
color: #888;
2015-02-09 21:24:01 +01:00
display: none;
left: 4px;
2015-04-24 14:36:19 +02:00
padding: 0;
2015-05-23 13:31:46 +02:00
position: fixed;
top: 4px;
2015-04-24 14:36:19 +02:00
}
#rulesetTools > span {
background-color: #ffe;
border: 1px solid #ddc;
border-radius: 4px;
cursor: pointer;
display: inline-block;
2016-11-05 19:48:42 +01:00
font-size: 1.8em;
2015-04-24 14:36:19 +02:00
line-height: 1.0;
margin: 0;
margin-right: 0.1em;
padding: 0.2em 0.4em;
text-align: center;
2015-04-24 14:36:19 +02:00
width: 1em;
2015-02-09 21:24:01 +01:00
}
2015-04-24 14:36:19 +02:00
#firewallContainer.dirty ~ #rulesetTools {
2015-02-09 21:24:01 +01:00
display: block;
}
2015-04-24 14:36:19 +02:00
#firewallContainer.dirty ~ #rulesetTools > span:hover {
color: black;
}