Skip to content

crate/delete: tinker with the requirements styling #10253

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

Merged
merged 2 commits into from
Dec 30, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions app/styles/crate/delete.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,31 @@
}
}

@counter-style sub {
system: extends lower-alpha;
prefix: '(';
suffix: ') ';
}

.requirements {
ul {
list-style: none;
padding-left: 0;
.or {
padding-left: 3.5em;
padding-bottom: 0.3em;
font-weight: bold;
font-variant: small-caps;
}

.first {
margin-bottom: 0.5em;
}

.second {
margin-top: 0.5em;
}

ol ol {
list-style-type: sub;
padding-left: 1.5em;
}
}

Expand Down
17 changes: 10 additions & 7 deletions app/templates/crate/delete.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@

<div local-class="requirements">
<h3>Requirements:</h3>
<p>A crate can only be deleted if:</p>
<ol>
<li>the crate has been published for less than 72 hours, or</li>
<p>A crate can only be deleted if either:</p>
<ol local-class='first'>
<li>the crate has been published for less than 72 hours</li>
</ol>
<div local-class='or'>or</div>
<ol start="2" local-class='second'>
<li>
<ul>
<li>the crate only has a single owner, and</li>
<li>the crate has been downloaded less than 500 times for each month it has been published, and</li>
<ol>
<li>the crate only has a single owner, <em>and</em></li>
<li>the crate has been downloaded less than 500 times for each month it has been published, <em>and</em></li>
<li>the crate is not depended upon by any other crate on crates.io.</li>
</ul>
</ol>
</li>
</ol>
</div>
Expand Down
Loading