Skip to content

GitHub's custom tab size is overridden #4806

Closed

Activity

  1. fregante commented on Sep 21, 2021

    @fregante
    Member

    You're too fast 😃

  2. kidonng commented on Sep 21, 2021

    @kidonng
    MemberAuthor

    😃 I didn't even subscribe to https://github.blog/changelog/, I just happened to notice it in the settings.

  3. fregante commented on Sep 21, 2021

    @fregante
    Member

    Considerations:

    • Our selector currently overrides GitHub’s preference
    • GitHub sets the size on each rendered code block (table.highlight) via [data-tab-size="8"]
    • There's apparently no way to distinguish between a user choice of 8 and an "non set" tab size

    The last point means we might override the user’s choice, so that alone is a good reason to drop it altogether.

    Some things to be aware of:

    • we're using our custom --tab-size variable in show-whitespace so we need to update that as well

    Instead of defaulting to 4 like it does now, we should set --tab-size on each of the [data-tab-size="XXX"] settings and then keep using it as we are now.

  4. added
    small
    and removed on Sep 21, 2021
  5. kidonng commented on Sep 21, 2021

    @kidonng
    MemberAuthor

    Instead of defaulting to 4 like it does now, we should set --tab-size on each of the [data-tab-size="XXX"] settings and then keep using it as we are now.

    Can't we just use attr(data-tab-size)? Or just provide matching styles for multiple classes like GitHub.

  6. fregante commented on Sep 21, 2021

    @fregante
    Member
    • GitHub sets the size on each rendered code block (table.highlight)

    This also seems to mean that input fields aren't covered 🤔

    If I disable RGH I don't see any changes in tab size, but also I don't see any tab-size property at all. Maybe we should leave that CSS just for the text areas, unless they're inside a [data-tab-size] table.

  7. notlmn commented on Sep 22, 2021

    @notlmn
    Contributor

    It's been a while, but I think we had --tab-size to play nice with the Tab Size extension. You really don't see that being set anywhere in our codebase, that can be removed I think.

  8. fregante commented on Sep 23, 2021

    @fregante
    Member

    It's used by show-whitespace

  9. added
    Please! ♥︎
    on Sep 27, 2021
  10. changed the title [-]Drop tab size modification[/-] [+]GitHub's custom tab size is overridden[/+] on Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Please! ♥︎acceptedbugsmall

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions