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

💄 [#1257] Underline anchors in some content #561

Merged
merged 6 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<li class="faq__list-item">
{% firstof question.pk|slugify as id %}
{% firstof 'question-'|add:id|add:'-answer' as answer_id %}
{% link bold=True href='#'|add:answer_id icon='chevron_right' secondary=True text=question.question toggle="open" %}
{% link bold=True href='#'|add:answer_id icon='keyboard_arrow_up' secondary=True text=question.question toggle="open" %}
vaszig marked this conversation as resolved.
Show resolved Hide resolved
<div id="{{ answer_id }}" class="p faq__answer">{{ question.answer|ckeditor_content|safe }}</div>
</li>
{% endfor %}
Expand Down
14 changes: 13 additions & 1 deletion src/open_inwoner/scss/components/Faq/_Faq.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@
transform-origin: center;
}

.link[aria-expanded='false'] {
color: var(--font-color-body);
font-weight: normal;
}
.link[aria-expanded='true'] {
color: var(--color-secondary);
}

.link[aria-expanded='true'] [class*='icon'] {
transform: rotate(90deg);
transform: rotate(180deg);
}

.faq__answer {
Expand All @@ -52,6 +60,10 @@

&__answer--open {
margin-top: var(--spacing-large) !important;

.link {
text-decoration: underline;
}
}

&__answer:not(#{&}__answer--open) {
Expand Down
4 changes: 2 additions & 2 deletions src/open_inwoner/scss/components/Typography/Link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

*[class*='icon'],
*[class*='Icon'] {
font-size: 20px;
width: 20px;
font-size: 24px;
width: 24px;
}

&--icon-position-before {
Expand Down
4 changes: 4 additions & 0 deletions src/open_inwoner/scss/components/Typography/LinkList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
white-space: nowrap;
margin-bottom: var(--spacing-small);

.material-icons {
vertical-align: middle;
}

&--wrap {
white-space: normal;
}
Expand Down
17 changes: 14 additions & 3 deletions src/open_inwoner/scss/components/Typography/P.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,18 @@
}

.p .link {
//text-decoration: underline;
.content {
text-decoration: underline;
}
&:hover {
text-decoration: none;
}

strong {
text-decoration: underline;
.material-icons {
text-decoration: none;
&:hover {
text-decoration: none;
}
}
}

Expand All @@ -54,4 +60,9 @@
& > .p {
margin: 0 !important;
}

/// leaflet reset
.link {
text-decoration: underline;
}
}
12 changes: 11 additions & 1 deletion src/open_inwoner/scss/overwrites/_ckeditor.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.li .link {
.li .link,
.p .link {
text-decoration: underline;
display: inline;
}

// Style icons separately
.p .link *[class*='icon'] {
text-decoration: none;
transform: scale(0.75);
display: inline-block;
vertical-align: bottom;
}