further css cleanup, no dependency on themes folder existing

This commit is contained in:
Jeremy Kauffman 2017-09-06 18:34:11 -04:00
parent 67c1ec531e
commit de69a7c76b
26 changed files with 51 additions and 96 deletions

View file

@ -55,6 +55,10 @@ export function doSetClientSetting(key, value) {
export function doGetThemes() {
const dir = `${remote.app.getAppPath()}/dist/themes`;
if (!fs.existsSync(dir)) {
return;
}
// Get all .css files
const files = readdirSync(dir).filter(file => extname(file) === ".css");

View file

@ -8,7 +8,6 @@ const Link = props => {
style,
label,
icon,
badge,
button,
disabled,
children,
@ -36,7 +35,6 @@ const Link = props => {
<span {...("button" in props ? { className: "button__content" } : {})}>
{"icon" in props ? <Icon icon={icon} fixed={true} /> : null}
{label ? <span className="link-label">{label}</span> : null}
{"badge" in props ? <span className="badge">{badge}</span> : null}
</span>
);
}

View file

@ -1,54 +0,0 @@
@charset "UTF-8";
$spacing-vertical: 24px;
$width-page-constrained: 800px;
@mixin absolute-center()
{
}
@mixin linear-gradient($from-color, $to-color) {
background-color: $to-color; /* Fallback Color */
background-image: -webkit-linear-gradient(top, $from-color, $to-color); /* Chrome 10+, Saf5.1+, iOS 5+ */
background-image: -moz-linear-gradient(top, $from-color, $to-color); /* FF3.6 */
background-image: -ms-linear-gradient(top, $from-color, $to-color); /* IE10 */
background-image: linear-gradient(top, $from-color, $to-color);
}
@mixin placeholder {
&::-webkit-input-placeholder {@content}
&:-moz-placeholder {@content}
&:-ms-input-placeholder {@content}
}
@mixin text-link($color: var(--color-primary), $hover-opacity: 0.70) {
.icon
{
&:first-child {
padding-right: 5px;
}
&:last-child:not(:only-child) {
padding-left: 5px;
}
}
&:not(.no-underline) {
text-decoration: underline;
.icon {
text-decoration: none;
}
}
&:hover
{
opacity: $hover-opacity;
transition: opacity var(--transition-duration) var(--transition-type);
text-decoration: underline;
.icon {
text-decoration: none;
}
}
color: $color;
cursor: pointer;
}

View file

@ -1,5 +1,3 @@
@import "global";
html
{
height: 100%;
@ -24,14 +22,6 @@ body
background: var(--window-bg);
}
.badge
{
background: var(--color-money);
display: inline-block;
padding: 2px;
color: white;
border-radius: 2px;
}
.credit-amount--indicator
{
font-weight: bold;

View file

@ -1,5 +1,3 @@
@import "global";
@font-face {
font-family: 'FontAwesome';
src: url('../font/fontawesome-webfont.eot?v=4.7.0');

View file

@ -1,4 +1,9 @@
@import "global";
/*
Both of these should probably die and become variables as well
*/
$spacing-vertical: 24px;
$width-page-constrained: 800px;
$text-color: #000;
:root {
@ -39,7 +44,7 @@
--transition-type: ease;
/* Text */
--text-color: #000;
--text-color: $text-color;
--text-help-color: #EEE;
--text-max-width: 660px;
--text-link-padding: 4px;

View file

@ -1,3 +1,4 @@
@charset "UTF-8";
@import "_reset";
@import "_vars";
@import "_icons";
@ -21,5 +22,4 @@
@import "component/_pagination.scss";
@import "component/_markdown-editor.scss";
@import "page/_developer.scss";
@import "page/_reward.scss";
@import "page/_show.scss";

View file

@ -1,4 +1,4 @@
@import "../global";
@import "../mixin/link.scss";
$button-focus-shift: 12%;

View file

@ -1,5 +1,3 @@
@import "../global";
.card {
margin-left: auto;
margin-right: auto;

View file

@ -1,4 +1,3 @@
@import "../global";
.channel-indicator__icon--invalid {
color: var(--color-error);

View file

@ -1,4 +1,3 @@
@import "../global";
.file-actions
{

View file

@ -1,4 +1,3 @@
@import "../global";
$height-file-tile: $spacing-vertical * 6;
.file-tile__row {

View file

@ -1,4 +1,9 @@
@import "../global";
@mixin placeholder {
&::-webkit-input-placeholder {@content}
&:-moz-placeholder {@content}
&:-ms-input-placeholder {@content}
}
.form-row-submit
{
@ -63,7 +68,7 @@ input[type="text"].input-copyable {
input[type="search"],
input[type="date"] {
@include placeholder {
//color: lighten($color-text-dark, 60%);
color: lighten($text-color, 60%);
}
transition: all var(--transition-duration) var(--transition-type);
cursor: pointer;

View file

@ -1,4 +1,3 @@
@import "../global";
#header
{

View file

@ -1,4 +1,3 @@
@import "../global";
.load-screen {
color: white;

View file

@ -1,4 +1,3 @@
@import "../global";
$border-radius-menu: 2px;

View file

@ -1,4 +1,3 @@
@import "../global";
.modal-overlay, .error-modal-overlay {
position: fixed;

View file

@ -1,4 +1,3 @@
@import "../global";
.notice {
padding: 10px 20px;

View file

@ -1,4 +1,3 @@
@import "../global";
.pagination {
display: block;

View file

@ -1,4 +1,3 @@
@import "../global";
$padding-snack-horizontal: $spacing-vertical;

View file

@ -1,4 +1,3 @@
@import "../global";
table.table-standard {
word-wrap: break-word;

View file

@ -1,4 +1,4 @@
@import "../global";
@import "../mixin/link.scss";
.tooltip {
position: relative;

View file

@ -1,4 +1,3 @@
@import "../global";
$height-video-embedded: $width-page-constrained * 9 / 16;

30
ui/scss/mixin/link.scss Normal file
View file

@ -0,0 +1,30 @@
@mixin text-link($color: var(--color-primary), $hover-opacity: 0.70) {
.icon
{
&:first-child {
padding-right: 5px;
}
&:last-child:not(:only-child) {
padding-left: 5px;
}
}
&:not(.no-underline) {
text-decoration: underline;
.icon {
text-decoration: none;
}
}
&:hover
{
opacity: $hover-opacity;
transition: opacity var(--transition-duration) var(--transition-type);
text-decoration: underline;
.icon {
text-decoration: none;
}
}
color: $color;
cursor: pointer;
}

View file

@ -1,5 +0,0 @@
@import "../global";
.reward-page__details {
//background-color: lighten($color-canvas, 1.5%);
}

View file

@ -1,5 +1,3 @@
@import "../global";
.show-page-media {
text-align: center;
margin-bottom: $spacing-vertical;