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

docs: fix UI bug on rules index and details pages #16082

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/src/_includes/layouts/doc.html
Expand Up @@ -53,8 +53,10 @@ <h2 id="resources">Resources</h2>
<div class="docs-main__content">
<h1>{{ title }}</h1>
{% if rule_meta %}
{%set id = true if (rule_meta.docs.recommended or rule_meta.fixable or rule_meta.hasSuggestions) else false %}
<p>{{ rule_meta.docs.description | markdown | safe }}</p>
{{ ruleCategories({
index: id,
recommended: rule_meta.docs.recommended,
fixable: rule_meta.fixable,
hasSuggestions: rule_meta.hasSuggestions
Expand Down
33 changes: 30 additions & 3 deletions docs/src/assets/scss/components/rules.scss
@@ -1,14 +1,41 @@
.rule-categories {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 2rem 1rem;
gap: 0;
margin-bottom: 3rem;
background-color: var(--lightest-background-color);
border: 1px solid var(--divider-color);
border-radius: var(--border-radius);

.rule-category {
margin: 0;
padding: 0;
padding: 1rem;
background: none;
border: none;

@media screen and (min-width:768px){
&:not(:first-child)::after {
content: "";
display: block;
padding: 1px;
border-left: 1px solid var(--divider-color);
left: 0px;
}
}

@media screen and (min-width:768px) and (max-width:1023px), screen and (min-width:1440px){
&:not(:first-child)::after {
height: 70%;
position: absolute;
}
}

@media screen and (min-width:1024px) and (max-width:1439px){
&:nth-child(2)::after {
height: 70%;
position: absolute;
}
}
}

.rule-category__description {
Expand All @@ -19,6 +46,7 @@
.rule-category {
font-size: var(--step--1);
display: flex;
position: relative;
flex-wrap: wrap;
align-items: flex-start;
gap: 1rem;
Expand Down Expand Up @@ -133,7 +161,6 @@ a.rule__name {
}
}


/* related rules */

.related-rules__list {
Expand Down