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

View File

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

View File

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

View File

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

View File

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