Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regex search and github integration status bar #87

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@import "styles/atom";
@import "styles/buttons";
@import "styles/editor";
@import "styles/github";
@import "styles/inputs";
@import "styles/lists";
@import "styles/messages";
Expand Down
19 changes: 16 additions & 3 deletions styles/atom.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,28 @@
.source .regexp {
color: @base-background-color;
}

.syntax--text,
.syntax--source,
.syntax--string {
color: @base-background-color;
}
}

.btn-group-find .btn {
.button-variant(@text-color-info);
.button-variant(@base-background-color, @text-color-info);
}

.btn-group-replace .btn,
.btn-group-replace-all .btn {
.button-variant(@text-color-warning);
.button-variant(@base-background-color, @text-color-warning);
}

.btn-toggle .btn {
// Pin padding and line height to avoid having them overwritten.
padding: 0 !important;
line-height: 1.75 !important;
.button-variant-inner(@base-background-color, @text-color-subtle, @text-color-highlight);
}

.find-meta-container {
Expand Down Expand Up @@ -102,7 +115,7 @@ kbd {
+ Select Forms +
+--------------+*/
select.form-control {
.button(@button-border-color);
.button(@base-background-color, @button-border-color);
.text(normal);
height: @input-height;
line-height: @input-height;
Expand Down
18 changes: 6 additions & 12 deletions styles/buttons.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ button,
button.icon,
.btn-default,
.btn {
.button(@button-border-color);

&:focus,
&:active:focus {
outline: 0;
border: 1px solid @text-color-selected !important;
}
.button(@base-background-color, @button-border-color);

&.btn-xs {
font-size: 10px;
Expand All @@ -41,23 +35,23 @@ button.icon,
}

&.btn-error {
.button-variant(@text-color-error);
.button-variant(@base-background-color, @text-color-error);
}

&.btn-info {
.button-variant(@text-color-info);
.button-variant(@base-background-color, @text-color-info);
}

&.btn-primary {
.button-variant(@text-color-info);
.button-variant(@base-background-color, @text-color-info);
}

&.btn-success {
.button-variant(@text-color-success);
.button-variant(@base-background-color, @text-color-success);
}

&.btn-warning {
.button-variant(@text-color-warning);
.button-variant(@base-background-color, @text-color-warning);
}

&.status-indicator {
Expand Down
31 changes: 31 additions & 0 deletions styles/github.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (C) 2016-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2016-present Sven Greb <[email protected]>
*
* Project: Nord Atom UI
* Repository: https://github.com/arcticicestudio/nord-atom-ui
* License: MIT
* References:
* https://atom.io/docs/api/latest/Atom
* https://atom.io/docs
* https://github.com/atom/atom/blob/master/static/variables/ui-variables.less
* http://lesscss.org
*/

.github-CommitView-hardwrap,
.github-StatusBarTile,
.github-ChangedFilesCount,
.github-branch,
.github-PushPull {
border: none !important;

// Disable button effects, not the cleanes way.
color: @text-color !important;
background: @base-border-color !important;

cursor: pointer !important;
}

.github-BranchMenuView-select {
color: @text-color;
}
5 changes: 3 additions & 2 deletions styles/notifications.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ atom-notifications {
.btn {
height: 24px !important;
line-height: 20px !important;

&.close-all {
.button-variant(@text-color-info);
.button-variant(@base-background-color, @text-color-info);
color: @text-color-info !important; // some other funky stuff going on.
}
}

Expand Down
8 changes: 4 additions & 4 deletions styles/package-support/build.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
opacity: 1;

.btn {
.button(@button-border-color);
.button(@base-background-color, @button-border-color);

&.icon-zap {
.button-variant(@text-color-info);
.button-variant(@base-background-color, @text-color-info);
}

&.icon-trashcan {
.button-variant(@text-color-warning);
.button-variant(@base-background-color, @text-color-warning);
}

&.icon-x {
.button(@button-border-color);
.button(@base-background-color, @button-border-color);
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions styles/panels.less
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,26 @@ atom-panel-container {
border-radius: 0;

& .btn {
.button(@button-border-color);
.button(@base-background-color, @button-border-color);

&.btn-primary {
.button-variant(@text-color-info);
.button-variant(@base-background-color, @text-color-info);
}

&.btn-info {
.button-variant(@text-color-info);
.button-variant(@base-background-color, @text-color-info);
}

&.btn-success {
.button-variant(@text-color-success);
.button-variant(@base-background-color, @text-color-success);
}

&.btn-warning {
.button-variant(@text-color-warning);
.button-variant(@base-background-color, @text-color-warning);
}

&.btn-error {
.button-variant(@text-color-error);
.button-variant(@base-background-color, @text-color-error);
}

font-size: 11px !important;
Expand Down
6 changes: 5 additions & 1 deletion styles/status-bar.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ status-bar {
font-size: 11px;

& > .flexbox-repaint-hack {
padding-top: 3px;
padding-top: 2px;
}

span {
font-size: 11px;
}

.package-updates-status-view {
cursor: pointer !important;
}
}
85 changes: 35 additions & 50 deletions styles/ui-mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,81 +10,66 @@
/*+---------+
+ Buttons +
+---------+*/
.button(@color) {
.button(@background-color, @highlight-color) {
color: @text-color;
font-size: 12px;
font-weight: 400;
background: transparent;
background: @background-color;
height: @input-height;
line-height: @input-height;
border-radius: @component-border-radius;
border-color: @color;
border-width: 1px !important;
border-style: solid !important;
border: 1px solid @highlight-color !important;
box-shadow: none !important;
transition: all @transition-time ease;
padding: 0 10px;

&:focus {
outline: none;
}

&:focus,
&:hover {
color: @base-background-color !important;
background: @color !important;
border-color: @color !important;
}

cursor: pointer;

&:hover,
&:active,
&:active:focus {
color: @base-background-color;
background: @color;
border: 1px solid @text-color-selected !important;
}

&.selected {
color: @base-background-color;
background: @button-background-color-selected;
border: 1px solid @color !important;

&:hover {
color: @base-background-color !important;
border: 1px solid @text-color-highlight !important;
background: @color !important;
}
color: @background-color;
background: @highlight-color;
}


&:focus {
outline: none;
}

&[disabled],
&.disabled {
opacity: 1;
background-color: transparent !important;
border-color: transparent !important;
color: @text-color-subtle !important;
cursor: default;
}
}

.button-variant(@color) {
.button(@color);
color: @color !important;
border-color: @color !important;
background: transparent;
// Colored buttons with same content color as highlight-color.
.button-variant(@base-background-color, @highlight-color) {
.button(@base-background-color, @highlight-color);
color: @highlight-color;
}

// Only highlight inner content on hover, then everything on selected.
.button-variant-inner(@background-color, @base-color, @highlight-color) {
.button(@background-color, @highlight-color);
color: @base-color;

// No idea why this works, but without it find and replace buttons stay
// toggeled on until something else is focused.
// Copied idea from one-dark-ui theme.
background-image: linear-gradient(@background-color, @background-color);

&:hover {
border-color: @color !important;
color: @highlight-color;
background-color: @background-color;
}


&:active,
&.selected {
color: @base-background-color !important;
background: @color !important;
}

&[disabled],
&.disabled {
opacity: 1;
background-color: transparent !important;
border-color: transparent !important;
color: @text-color-subtle !important;
color: @background-color;
background-color: @highlight-color;
}
}

Expand Down
3 changes: 2 additions & 1 deletion styles/ui-theme-settings.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
background-color: @theme-setting-formfocuseffect-background-color;

.syntax--text,
.syntax--source {
.syntax--source,
.syntax--string {
color: @text-color;

.regexp {
Expand Down
2 changes: 1 addition & 1 deletion styles/ui-variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
+ Components +
+------------+*/
/*+--- Button ---+*/
@button-background-color: transparent;
@button-background-color: @base-background-color;
@button-background-color-hover: @input-border-color;
@button-background-color-selected: @input-border-color;
@button-border-color: @input-border-color;
Expand Down