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

Improve CSS for "hide item contents, not items" #1

Merged
merged 1 commit into from
Mar 28, 2021

Commits on Mar 27, 2021

  1. Improve CSS for "hide contents, not items"

    Introduce a first use of the `<details>` and `<summary>` tags as
    replacements for the JS-built toggles. I think this has the potential to
    replace all the JS toggles and generally clean up the JS, CSS, and HTML.
    
    Split rendering of attributes into two cases: in the case where they are
    rendered as descendents of a `<pre>` tag, where they use indent spaces and
    newlines for formatting, matching their surrounding markup. In the case
    where they are rendered as descendants of a `<code>` tag, they are
    rendered as `<div>`. This let me clean up some fragile CSS that was
    adjusting the margin-left of attributes depending on context.
    
    Remove toggles for attributes. With the ALLOWED_ATTRIBUTES filter, it's
    rare for an item to have more than one attribute, so hiding attributes
    behind a toggle doesn't save any screen space in the common case.
    
    Fix a couple of invocations of `matches!` that didn't compile on my
    machine.
    
    Fix a boolean for the JS `createToggle` call that was causing
    "Expand description" to show up spuriously on already-expanded
    descriptions.
    
    Add JS for auto-hide settings and hide all / show all.
    
    Remove a z-index property and some font color tweaks made unnecessary
    by the <details> toggles.
    
    Add CSS for the <details> toggles.
    jsha committed Mar 27, 2021
    Configuration menu
    Copy the full SHA
    79bd6be View commit details
    Browse the repository at this point in the history