Fix underlining

This commit is contained in:
Ilya Ig. Petrov 2017-05-20 05:12:12 -07:00
parent 7512bb697f
commit b3753cb622
5 changed files with 16 additions and 16 deletions

View File

@ -33,8 +33,13 @@ export default function getExceptions(theState) {
};
return (
<div>
return props.flags.ifInsideOptionsPage
? (
<div class="nowrap">
Редактор исключений доступен только для <a href="chrome://newtab">вкладок</a>.
</div>)
:
(<div>
{createElement(ExcEditor, props)}
<ul id="excMods">
{
@ -54,9 +59,6 @@ export default function getExceptions(theState) {
}}
/>;
//const key = conf.key;
//modKeyToLi[key] = li;
})
}
</ul>

View File

@ -41,7 +41,7 @@ export default function getModList(theState) {
</ul>
{createElement(ApplyMods, Object.assign({}, props,
{
disabled: !this.state.ifChangesStashed,
disabled: !this.state.ifChangesStashed || props.ifInputsDisabled,
onClick: () => {
const oldMods = this.props.apis.pacKitchen.getPacMods();

View File

@ -2,7 +2,7 @@ import Inferno, { linkEvent } from 'inferno';
import Component from 'inferno-component';
import css from 'csjs-inject';
export default function getTabPannel({ flags }) {
export default function getTabPannel({ flags, baseCss }) {
const scopedCss = css`
@ -18,19 +18,17 @@ export default function getTabPannel({ flags }) {
:root.ifInsideOptionsPage .tabContainer {
padding-bottom: 0.6em;
}
:root.ifInsideOptionsPage .tabContainer:not(:last-child),
.underlined {
:root.ifInsideOptionsPage nav.mainNav > div:not(:last-child) {
border-bottom: 1px solid var(--cr-options-headline);
}
:root.ifInsideOptionsPage .navLabels {
display: none;
}
/* HIDE starts. */
:root:not(.ifInsideOptionsPage) .mainNav input:not(:checked) + section,
/* One button shared between two sections: */
:root:not(.ifInsideOptionsPage) .mainNav input:not(:checked) + #apply-mods-section
:root:not(.ifInsideOptionsPage) .mainNav input:not(:checked) + section
{
/* Hide, but preclude width resizes. */
height: 0px !important;
@ -45,9 +43,7 @@ export default function getTabPannel({ flags }) {
transform: scaleY(0) !important;
}
:root:not(.ifInsideOptionsPage) .mainNav input:not(:checked) + section *,
/* One button shared between two sections: */
:root:not(.ifInsideOptionsPage) .mainNav #apply-mods-section * // TODO
:root:not(.ifInsideOptionsPage) .mainNav input:not(:checked) + section *
{
margin-top: 0 !important;
margin-bottom: 0 !important;

View File

@ -1,7 +1,7 @@
export default function append(document, { flags }) {
// innerText converts \n to <br>, so:
document.head.querySelector('style').innerHTML = `
document.querySelector('style').innerHTML = `
/* GLOBAL VARIABLES */
:root {

View File

@ -3,6 +3,7 @@
import Inferno from 'inferno';
import createElement from 'inferno-create-element';
import appendGlobalCss from './globalCss';
import css from 'csjs-inject';
import getApp from './components/App';
chrome.runtime.getBackgroundPage( (bgWindow) =>
@ -40,6 +41,7 @@ chrome.runtime.getBackgroundPage( (bgWindow) =>
// STATE DEFINED, COMPOSE.
appendGlobalCss(document, theState);
// Extendable css classes.
Inferno.render(
createElement(getApp(theState), theState),