Skip to content

Commit 95cbfeb

Browse files
committed
Fix icon color and code title rendering
1 parent f67c8f7 commit 95cbfeb

File tree

4 files changed

+24
-32
lines changed

4 files changed

+24
-32
lines changed

app/javascript/css/components/article-content.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,4 @@
117117
padding-bottom: var(--space-s);
118118
padding-inline-start: var(--space-s);
119119
}
120-
121-
& a svg.icon {
122-
width: 1rem;
123-
height: 1rem;
124-
}
125120
}

app/javascript/css/components/code.scss

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,36 @@
4848
& a {
4949
font-family: var(--sans-serif);
5050
gap: 0.25rem;
51-
align-items: center;
51+
align-items: baseline;
5252
display: flex;
5353
font-weight: bold;
5454
text-decoration: none;
5555
& svg {
5656
// fill: var(--joy-light);
5757
}
5858
}
59+
60+
& a svg.icon {
61+
width: 0.75rem;
62+
height: 0.75rem;
63+
}
64+
}
65+
66+
svg {
67+
fill: currentColor;
68+
color: currentColor;
69+
70+
&.app-dots {
71+
display: inline-block;
72+
vertical-align: top;
73+
}
74+
75+
&.copy-text {
76+
/* width: 24px; */
77+
}
78+
&.check-mark {
79+
/* width: 24px; */
80+
}
5981
}
6082
}
6183
@media (min-width: $screen-lg) {
@@ -99,23 +121,6 @@
99121
line-height: 1.5715;
100122
}
101123

102-
svg {
103-
fill: currentColor;
104-
color: currentColor;
105-
106-
&.app-dots {
107-
display: inline-block;
108-
vertical-align: top;
109-
}
110-
111-
&.copy-text {
112-
/* width: 24px; */
113-
}
114-
&.check-mark {
115-
/* width: 24px; */
116-
}
117-
}
118-
119124
.clipboard-copy-container {
120125
font-family: var(--sans-serif);
121126
}

app/javascript/css/utilities/tailwind.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -897,14 +897,6 @@
897897
cursor: pointer;
898898
}
899899

900-
.fill-current {
901-
fill: currentColor;
902-
}
903-
904-
.fill-green-600 {
905-
fill: #16a34a;
906-
}
907-
908900
.w-\[16px\] {
909901
width: 16px;
910902
}

app/views/components/code_block/app_file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def initialize(filename, lines: nil, revision: "HEAD", **attributes)
1212
def view_template
1313
render ::CodeBlock::Article.new(**attributes) do |code_block|
1414
code_block.title do
15-
link(app_file.repo_url, "Source code on Github", class: "nc flex items-center gap-1") {
15+
link(app_file.repo_url, "Source code on Github", class: "nc") {
1616
plain app_file.app_path.to_s
1717
plain inline_svg_tag("external-link.svg", class: "icon icon-sm", height: 12, width: 12)
1818
}

0 commit comments

Comments
 (0)