Skip to content

Commit b7beed8

Browse files
authored
chore: clean css variables (#1227)
* chore: clean css variables * chore: update sphinx-autobuild * chore: update sphinx-autobuild
1 parent f33c6f6 commit b7beed8

40 files changed

+220
-322
lines changed

docs/_utils/pyproject_template.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ python = "^3.10"
99
pygments = "^2.18.0"
1010
sphinx-scylladb-theme = "^1.6.1"
1111
myst-parser = "^3.0.1"
12-
sphinx-autobuild = "^2024.4.16"
12+
sphinx-autobuild = "^2024.4.19"
1313
Sphinx = "^7.3.7"
1414
sphinx-multiversion-scylla = "^0.3.1"
1515
sphinx-sitemap = "^2.6.0"

docs/source/examples/code-blocks.rst

+23
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,29 @@ You can create code-blocks in any of the following `languages <https://pygments.
3636
3737
If you are including a large example (an entire file) as a code-block, refer to :doc:`Literal Include <includes>`.
3838

39+
Show line number
40+
----------------
41+
42+
To show the line number, add the option `:linenos:` to the code-block directive.
43+
44+
For example:
45+
46+
.. code-block:: rst
47+
48+
.. code-block:: rst
49+
:linenos:
50+
51+
Line 1
52+
Line 2
53+
54+
Renders:
55+
56+
.. code-block:: rst
57+
:linenos:
58+
59+
Line 1
60+
Line 2
61+
3962
Hide copy button
4063
----------------
4164

docs/source/upgrade/1-7-to-1-8.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Steps to apply this change:
6969
pygments = "^2.18.0"
7070
sphinx-scylladb-theme = "^1.6.1"
7171
myst-parser = "^3.0.1"
72-
sphinx-autobuild = "^2024.4.16"
72+
sphinx-autobuild = "^2024.4.19"
7373
Sphinx = "^7.3.7"
7474
sphinx-multiversion-scylla = "^0.3.1"
7575
sphinx-sitemap = "^2.6.0"

poetry.lock

+100-100
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ setuptools = ">=70.1.1,<75.0.0"
1919

2020
[tool.poetry.dev-dependencies]
2121
pytest = "^8.3.2"
22-
# See https://github.com/sphinx-doc/sphinx-autobuild/issues/177
23-
sphinx-autobuild = "2024.4.16"
22+
sphinx-autobuild = "^2024.4.19"
2423
pre-commit = "^3.7.1"
2524
myst-parser = "^3.0.1"
2625
sphinx-multiversion-scylla = "^0.3.2"

sphinx_scylladb_theme/static/css/main.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/css/base/_index.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
@import "variables/index";
1+
@import "fonticon";
2+
@import "variables";
23
@import "mixins";
34
@import "reset";

src/css/base/_mixins.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@mixin floating {
2-
background: var(--color-white);
2+
background: var(--white);
33
border: 0;
4-
border-radius: $round;
4+
border-radius: $border-radius-md;
55
box-shadow: 0px 4px 25px rgba(0, 0, 0, 0.15);
66
overflow: hidden;
77
}

src/css/base/_reset.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ html {
44
}
55

66
body {
7-
font-size: $font-base;
7+
font-size: $font-md;
88
font-family: $font-base-family;
99
line-height: 1;
1010
background-color: var(--bg-color);
@@ -22,8 +22,8 @@ a {
2222
}
2323

2424
a.reference:after {
25+
font-size: $font-xs;
2526
font-family: $font-icons-family;
26-
font-size: $font-smallest;
2727
padding: 0 4px;
2828
}
2929

@@ -46,7 +46,7 @@ a:hover {
4646
}
4747

4848
.toc-backref:hover {
49-
color: var(--color-typography-base);
49+
color: var(--black);
5050
}
5151

5252
h1,

src/css/base/_variables.scss

+36-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,38 @@ $border-width: 1px;
4848
$border-radius: $spacer-3xs;
4949
$border-radius-md: $spacer-xxs;
5050

51+
$gap: 30px;
52+
$footer-height: 180px;
53+
$header-height: 50px;
54+
$promo-banner-height: 42.5px;
55+
$promo-banner-height-large: 70px;
56+
$header-height-large: 80px;
57+
$max-content-width: 1440px;
58+
$max-footer-width: 1030px;
59+
$max-full-width: 1190px;
60+
$promo-banner-header-height: $promo-banner-height + $header-height;
61+
$promo-banner-header-height-large: $promo-banner-height-large + $header-height-large;
62+
$search-box-width: 318px;
63+
$secondary-side-nav-width: 286px;
64+
$side-nav-width: 357px;
65+
$side-nav-width-collapsed: 126px;
66+
67+
68+
// Breakpoint variables
69+
$small: 0px;
70+
$medium: 640px;
71+
$large: 1024px;
72+
$xlarge: 1200px;
73+
$xxlarge: 1440px;
74+
75+
// Font variables
76+
$font-base-family: "Roboto", sans-serif;
77+
$font-icons-family: "FontAwesome";
78+
79+
$font-md: 16px;
80+
$font-sm: 14px;
81+
$font-xs: 12px;
82+
5183
:root {
5284
--white: #{$white};
5385
--gray-50: #{$gray-50};
@@ -84,13 +116,16 @@ $border-radius-md: $spacer-xxs;
84116
--navigation-bg: #{$navigation-bg};
85117
--card-bg: var(--white);
86118
--admonition: #{$admonition};
119+
--scollbar-bg: #b3bac5;
120+
--tooltip-bg : #{$gray-900};
87121

88122
--shadow-lg: 0px 4px 25px rgba(0, 0, 0, 0.15);
89123
--border-width: #{$border-width};
90124
--border-radius: #{$border-radius};
91125
--border-radius-md: #{$border-radius-md};
92-
126+
--line-number: #5a7184;
93127
--logo-url: "../img/logo-scylla-horizontal-color.svg";
128+
94129
}
95130

96131
.dark {

src/css/base/variables/_breakpoints.scss

-5
This file was deleted.

src/css/base/variables/_colors.scss

-121
This file was deleted.

src/css/base/variables/_index.scss

-4
This file was deleted.

src/css/base/variables/_measuraments.scss

-17
This file was deleted.

src/css/base/variables/_typography.scss

-11
This file was deleted.

src/css/components/_admonitions.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
border-radius: 4px;
55
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.12);
66
color: var(--text-muted);
7-
font-size: $font-small;
7+
font-size: $font-sm;
88
line-height: 20px;
99
margin-bottom: $gap;
1010
overflow: auto;

src/css/components/_breadcrumbs.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
a,
88
.bread__item:not(.bread__item--last)::after {
99
color: var(--text-color);
10-
font-size: $font-smallest;
10+
font-size: $font-xs;
1111
font-weight: 400;
1212
letter-spacing: 1.5px;
1313
line-height: 2;

src/css/components/_buttons.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
border-radius: 4px;
55
color: var(--text-color);
66
display: inline;
7-
font-size: $font-small;
7+
font-size: $font-sm;
88
letter-spacing: 1px;
99
line-height: 21px;
1010
padding: 12px 14px;

src/css/components/_code-blocks.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ code {
33
background-color: var(--well-bg);
44
border: none;
55
border-radius: 4px;
6-
font-size: $font-small;
6+
font-size: $font-sm;
77

88
&.download {
99
background: none;
@@ -16,9 +16,9 @@ code {
1616

1717
pre {
1818
background-color: var(--well-bg);
19-
border-radius: $round;
19+
border-radius: $border-radius-md;
2020
color: var(--code-color);
21-
font-size: $font-small;
21+
font-size: $font-sm;
2222
line-height: 26px;
2323
margin-bottom: $gap;
2424
overflow: auto;
@@ -50,8 +50,8 @@ code {
5050
}
5151

5252
.linenos {
53-
color: var(--color-typography-code-line-number);
54-
background-color: var(--color-background-code);
53+
color: var(--line-number);
54+
background-color: var(--well-bg);
5555
width: 50px;
5656

5757
span {

src/css/components/_content-navigation.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
&__title {
1717
color: var(--text-color);
1818
font-weight: 500;
19-
font-size: $font-smallest;
19+
font-size: $font-xs;
2020
letter-spacing: 1.5px;
2121
text-transform: uppercase;
2222
line-height: 24px;

src/css/components/_contribute.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
margin-bottom: 20px;
44

55
&__item {
6-
font-size: $font-small;
6+
font-size: $font-sm;
77
padding-bottom: 10px;
88
list-style: none;
99

0 commit comments

Comments
 (0)