reduce usercss bubble to UC
+ tweak CSS
* remove 'disabled' bubble * simplify .style-info * fix double padding between version and UC * match manager's font-weight for disabled styles in popup
This commit is contained in:
parent
17a0bd69c0
commit
3dc684f85f
|
@ -178,20 +178,6 @@ a:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.style-info {
|
|
||||||
text-align: right;
|
|
||||||
padding: 0 .25em;
|
|
||||||
font-weight: normal;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
.style-info[data-type=version] {
|
|
||||||
color: #666;
|
|
||||||
padding-left: .5em;
|
|
||||||
}
|
|
||||||
.newUI .style-info[data-type=version][data-value="1.0.0"] {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.applies-to {
|
.applies-to {
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
@ -243,40 +229,17 @@ a:hover {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.newUI .style-name::after,
|
|
||||||
.newUI .style-name-link::after {
|
|
||||||
vertical-align: text-top;
|
|
||||||
}
|
|
||||||
|
|
||||||
.disabled h2::after {
|
|
||||||
content: var(--genericDisabledLabel);
|
|
||||||
}
|
|
||||||
.disabled h2::after,
|
|
||||||
.entry.usercss .style-name-link::after {
|
.entry.usercss .style-name-link::after {
|
||||||
font-weight: normal;
|
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
text-transform: lowercase;
|
|
||||||
background: rgba(128, 128, 128, .2);
|
|
||||||
padding: 2px 5px 3px;
|
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-left: 1ex;
|
margin-left: 1ex;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
position: relative;
|
content: "UC";
|
||||||
top: -2px;
|
background-color: hsla(180, 35%, 50%, .35);
|
||||||
}
|
padding: 2px 3px;
|
||||||
.newUI .disabled h2::after,
|
|
||||||
.newUI .entry.usercss .style-name-link::after {
|
|
||||||
top: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.entry.usercss .style-name-link::after {
|
|
||||||
content: "usercss";
|
|
||||||
background-color: hsla(180, 100%, 20%, 1);
|
|
||||||
color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.disabled h2 .style-name-link,
|
.disabled h2 .style-name-link,
|
||||||
.disabled h2::after,
|
|
||||||
.disabled .actions,
|
.disabled .actions,
|
||||||
.disabled .applies-to {
|
.disabled .applies-to {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
|
@ -376,14 +339,25 @@ a:hover {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.newUI .entry > .style-info {
|
|
||||||
padding-right: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.newUI .entry .actions {
|
.newUI .entry .actions {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.style-info[data-type=version] {
|
||||||
|
color: #666;
|
||||||
|
padding-left: .5em;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.newUI .style-info[data-type=version][data-value=""],
|
||||||
|
.newUI .style-info[data-type=version][data-value="1.0.0"] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.newUI .entry .style-info[data-type=age] {
|
||||||
|
color: #999;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
/************ checkbox & select************/
|
/************ checkbox & select************/
|
||||||
|
|
||||||
.newUI .checker {
|
.newUI .checker {
|
||||||
|
@ -1175,7 +1149,6 @@ a:hover {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.newUI .style-name::after,
|
|
||||||
.newUI .style-name-link::after {
|
.newUI .style-name-link::after {
|
||||||
text-indent: 0;
|
text-indent: 0;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -96,7 +96,6 @@ const handleEvent = {};
|
||||||
// translate CSS manually
|
// translate CSS manually
|
||||||
document.styleSheets[0].insertRule(
|
document.styleSheets[0].insertRule(
|
||||||
`:root {${[
|
`:root {${[
|
||||||
'genericDisabledLabel',
|
|
||||||
'updateAllCheckSucceededSomeEdited',
|
'updateAllCheckSucceededSomeEdited',
|
||||||
'filteredStylesAllHidden',
|
'filteredStylesAllHidden',
|
||||||
].map(id => `--${id}:"${CSS.escape(t(id))}";`).join('')
|
].map(id => `--${id}:"${CSS.escape(t(id))}";`).join('')
|
||||||
|
@ -555,12 +554,12 @@ Object.assign(handleEvent, {
|
||||||
},
|
},
|
||||||
|
|
||||||
addEntryTitle(link) {
|
addEntryTitle(link) {
|
||||||
const entry = link.closest('.entry');
|
const style = link.closest('.entry').styleMeta;
|
||||||
link.title = [
|
const ucd = style.usercssData;
|
||||||
{prop: 'installDate', name: 'dateInstalled'},
|
link.title =
|
||||||
{prop: 'updateDate', name: 'dateUpdated'},
|
`${t('dateInstalled')}: ${t.formatDate(style.installDate) || '—'}\n` +
|
||||||
].map(({prop, name}) =>
|
`${t('dateUpdated')}: ${t.formatDate(style.updateDate) || '—'}\n` +
|
||||||
t(name) + ': ' + (t.formatDate(entry.styleMeta[prop]) || '—')).join('\n');
|
(ucd ? `UserCSS, v.${ucd.version}` : '');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -221,6 +221,10 @@ html[style] .entry-content {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.entry.disabled .style-name {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
.entry .main-controls {
|
.entry .main-controls {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user