Skip to content

Commit

Permalink
add --padding CSS Variable #874
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Apr 10, 2023
1 parent 47639fc commit fb51968
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 2.36.0
### Features
* split_equal accept optional object as 3rd argument with two options `trim` and `keepWords`
* add `--padding` CSS Variable [#874](https://github.com/jcubic/jquery.terminal/issues/874)
### Bugfix
* fix leading spaces in text wrapping
* fix glitch in typing animation when text have hyphen
Expand Down
11 changes: 8 additions & 3 deletions css/jquery.terminal-2.35.3.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Copyright (c) 2011-2023 Jakub T. Jankiewicz <https://jcubic.pl/me>
* Released under the MIT license
*
* Date: Mon, 10 Apr 2023 15:22:42 +0000
* Date: Mon, 10 Apr 2023 15:31:47 +0000
*/
.terminal .terminal-output .format, .cmd .format,
.cmd-prompt, .cmd-prompt div {
Expand Down Expand Up @@ -800,7 +800,7 @@ terminal .terminal-output > div {
box-sizing: border-box;
}
.terminal-scroller, .terminal .terminal-fill, .cmd-editable {
padding: calc(10px / var(--pixel-density, 1));
padding: calc(1px * var(--padding, 10) / var(--pixel-density, 1));
}
.cmd-editable {
padding-top: 0;
Expand All @@ -818,7 +818,7 @@ terminal .terminal-output > div {
text-shadow: 0 0 calc(var(--glow) * 5px) var(--color);
}
.terminal .cmd {
margin-bottom: calc(10px / var(--pixel-density, 1));
margin-bottom: calc(1px * var(--padding, 10) / var(--pixel-density, 1));
position: relative;
}
.terminal .partial, .terminal .partial > div {
Expand Down Expand Up @@ -966,6 +966,11 @@ terminal .terminal-output > div {
inherits: true;
initial-value: 1;
}
@property --padding {
syntax: '<number>';
inherits: true;
initial-value: 10;
}
@supports (-ms-ime-align:auto) {
.terminal h1::selection,
.terminal h2::selection,
Expand Down
4 changes: 2 additions & 2 deletions css/jquery.terminal-2.35.3.min.css

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions css/jquery.terminal-src.css
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ terminal .terminal-output > div {
box-sizing: border-box;
}
.terminal-scroller, .terminal .terminal-fill, .cmd-editable {
padding: calc(10px / var(--pixel-density, 1));
padding: calc(1px * var(--padding, 10) / var(--pixel-density, 1));
}
.cmd-editable {
padding-top: 0;
Expand All @@ -818,7 +818,7 @@ terminal .terminal-output > div {
text-shadow: 0 0 calc(var(--glow) * 5px) var(--color);
}
.terminal .cmd {
margin-bottom: calc(10px / var(--pixel-density, 1));
margin-bottom: calc(1px * var(--padding, 10) / var(--pixel-density, 1));
position: relative;
}
.terminal .partial, .terminal .partial > div {
Expand Down Expand Up @@ -966,6 +966,11 @@ terminal .terminal-output > div {
inherits: true;
initial-value: 1;
}
@property --padding {
syntax: '<number>';
inherits: true;
initial-value: 10;
}
@supports (-ms-ime-align:auto) {
.terminal h1::selection,
.terminal h2::selection,
Expand Down
11 changes: 8 additions & 3 deletions css/jquery.terminal.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Copyright (c) 2011-2023 Jakub T. Jankiewicz <https://jcubic.pl/me>
* Released under the MIT license
*
* Date: Mon, 10 Apr 2023 15:22:42 +0000
* Date: Mon, 10 Apr 2023 15:31:47 +0000
*/
.terminal .terminal-output .format, .cmd .format,
.cmd-prompt, .cmd-prompt div {
Expand Down Expand Up @@ -800,7 +800,7 @@ terminal .terminal-output > div {
box-sizing: border-box;
}
.terminal-scroller, .terminal .terminal-fill, .cmd-editable {
padding: calc(10px / var(--pixel-density, 1));
padding: calc(1px * var(--padding, 10) / var(--pixel-density, 1));
}
.cmd-editable {
padding-top: 0;
Expand All @@ -818,7 +818,7 @@ terminal .terminal-output > div {
text-shadow: 0 0 calc(var(--glow) * 5px) var(--color);
}
.terminal .cmd {
margin-bottom: calc(10px / var(--pixel-density, 1));
margin-bottom: calc(1px * var(--padding, 10) / var(--pixel-density, 1));
position: relative;
}
.terminal .partial, .terminal .partial > div {
Expand Down Expand Up @@ -966,6 +966,11 @@ terminal .terminal-output > div {
inherits: true;
initial-value: 1;
}
@property --padding {
syntax: '<number>';
inherits: true;
initial-value: 10;
}
@supports (-ms-ime-align:auto) {
.terminal h1::selection,
.terminal h2::selection,
Expand Down
4 changes: 2 additions & 2 deletions css/jquery.terminal.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/jquery.terminal.min.css.map

Large diffs are not rendered by default.

0 comments on commit fb51968

Please sign in to comment.