Skip to content

Commit 9289732

Browse files
Simplify panel styling (#381)
* Add panel shortcut and simplify styling * More
1 parent 9c7cbb2 commit 9289732

2 files changed

Lines changed: 5 additions & 50 deletions

File tree

assets/theme-css/panel.css

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
.panel {
2-
border-radius: 6px;
3-
box-shadow: none;
4-
font-size: 1rem;
52
margin: 1em;
63
}
74

@@ -20,14 +17,9 @@
2017
height: 140px;
2118
min-width: 275px;
2219
width: 335px;
23-
margin: 0.5em 1em;
2420
border-radius: 3px;
2521
}
2622

27-
.panel-box-text > a {
28-
color: var(--colorPrimary);
29-
}
30-
3123
.panel-box-text {
3224
margin: 15px;
3325
font-size: 14px;
@@ -77,42 +69,8 @@
7769
}
7870
}
7971

80-
.panel-underline {
81-
display: inline-block;
82-
vertical-align: middle;
83-
position: relative;
84-
overflow: hidden;
85-
}
86-
87-
.panel-underline:before {
88-
content: "";
89-
position: absolute;
90-
z-index: -1;
91-
left: 0;
92-
right: 100%;
93-
bottom: 0;
94-
background: #013243;
95-
height: 4px;
96-
-webkit-transition-property: right;
97-
transition-property: right;
98-
-webkit-transition-duration: 0.3s;
99-
transition-duration: 0.3s;
100-
-webkit-transition-timing-function: ease-out;
101-
transition-timing-function: ease-out;
102-
}
103-
104-
.panel-underline:hover:before,
105-
.panel-underline:focus:before,
106-
.panel-underline:active:before {
107-
right: 0;
108-
}
109-
11072
.panel-button {
111-
border: 2px solid var(--colorPrimary);
112-
background-color: var(--colorLight);
113-
color: var(--pst-color-text-base) !important;
114-
font-size: 16px;
115-
cursor: pointer;
73+
border: 2px solid var(--pst-color-border);
11674
padding-bottom: calc(0.5em - 1px);
11775
padding-left: 1em;
11876
padding-right: 1em;
@@ -121,10 +79,9 @@
12179

12280
.panel-box-action a:hover {
12381
outline: none;
124-
border-color: var(--colorPrimary);
125-
background-color: var(--colorPrimary);
126-
color: var(--colorSecondaryLight) !important;
127-
cursor: pointer;
82+
color: var(--pst-color-info-text);
83+
background-color: var(--pst-color-info);
84+
border-color: var(--pst-color-info);
12885
padding-bottom: calc(0.5em - 1px);
12986
padding-left: 1em;
13087
padding-right: 1em;

layouts/partials/panel.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
{{- $tiles := index $panel "tiles" }}
55
<section class="panel">
66
<div class="container is-max-widescreen">
7-
87
<div class="panel-box-container">
98
{{- range $tiles }}
10-
<div class="panel-box-content panel-underline">
9+
<div class="panel-box-content">
1110
<p>
1211
<div class="panel-box-action">
1312
<a href="{{ .url }}" class="panel-button">{{ .buttonText }}</a>
@@ -17,6 +16,5 @@
1716
</div>
1817
{{- end }}
1918
</div>
20-
2119
</div>
2220
</section>

0 commit comments

Comments
 (0)