From aa9a0a9d8749df7eb0506d93a770321526f323fd Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Fri, 20 Dec 2024 10:57:36 -0800 Subject: [PATCH 1/2] crate/delete: tinker with the requirements styling --- app/styles/crate/delete.module.css | 26 +++++++++++++++++++++++--- app/templates/crate/delete.hbs | 17 ++++++++++------- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/app/styles/crate/delete.module.css b/app/styles/crate/delete.module.css index ec626385c40..1f657bf212d 100644 --- a/app/styles/crate/delete.module.css +++ b/app/styles/crate/delete.module.css @@ -47,10 +47,30 @@ } } +@counter-style sub { + system: extends lower-alpha; + prefix: '('; + suffix: ') '; +} + .requirements { - ul { - list-style: none; - padding-left: 0; + .or { + text-align: center; + 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; } } diff --git a/app/templates/crate/delete.hbs b/app/templates/crate/delete.hbs index 6011b54fc84..3b7bd08f260 100644 --- a/app/templates/crate/delete.hbs +++ b/app/templates/crate/delete.hbs @@ -20,15 +20,18 @@

Requirements:

-

A crate can only be deleted if:

-
    -
  1. the crate has been published for less than 72 hours, or
  2. +

    A crate can only be deleted if either:

    +
      +
    1. the crate has been published for less than 72 hours
    2. +
    +
    or
    +
    1. -
        -
      • the crate only has a single owner, and
      • -
      • the crate has been downloaded less than 500 times for each month it has been published, and
      • +
          +
        1. the crate only has a single owner, and
        2. +
        3. the crate has been downloaded less than 500 times for each month it has been published, and
        4. the crate is not depended upon by any other crate on crates.io.
        5. -
      +
From 62501129b7a7647b79eae853b10a73ec51d6dcaf Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Fri, 27 Dec 2024 10:38:16 -0800 Subject: [PATCH 2/2] crate/delete: change alignment of OR --- app/styles/crate/delete.module.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/styles/crate/delete.module.css b/app/styles/crate/delete.module.css index 1f657bf212d..6b73b90732e 100644 --- a/app/styles/crate/delete.module.css +++ b/app/styles/crate/delete.module.css @@ -55,7 +55,8 @@ .requirements { .or { - text-align: center; + padding-left: 3.5em; + padding-bottom: 0.3em; font-weight: bold; font-variant: small-caps; }