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

Support easy disabling of Docsy styles for HTML elements #1431

Open
1 task done
chalin opened this issue Feb 17, 2023 · 2 comments
Open
1 task done

Support easy disabling of Docsy styles for HTML elements #1431

chalin opened this issue Feb 17, 2023 · 2 comments
Labels
design/style Front-end site design / styling e0-minutes Effort < 60 min enhancement New feature or request p2-medium
Milestone

Comments

@chalin
Copy link
Collaborator

chalin commented Feb 17, 2023

Docsy defaults are good most of the time, but now and again it would be convenient if they could be easily disabled. For example, consider the following excerpt from https://github.com/google/docsy/blob/main/assets/scss/_content.scss:

.td-content {
    // ...
    table {
        @extend .table-striped;
        @extend .table-responsive;
        @extend .table;
    }
    // ...
}

To disable, we could use a special class named, say, td-initial to be used like this:

.td-content {
    // ...
    table:not(.td-initial) {
        @extend .table-striped;
        @extend .table-responsive;
        @extend .table;
    }
    // ...
}

In markdown, one could now write something like this to recover the base styles of one specific table:

| Element     | Attribute   |
| ----------- | ----------- |
| Header      | Title       |
| Paragraph   | Text        |
{.td-initial}

provided markdown attributes are enabled for blocks.

Thoughts @LisaFC et al.? I've come across the need for this and implemented it elsewhere -- see open-telemetry/opentelemetry.io#2359.

Tasks:

Related:

@chalin chalin added enhancement New feature or request design/style Front-end site design / styling e0-minutes Effort < 60 min p2-medium labels Feb 17, 2023
@emckean
Copy link
Collaborator

emckean commented Feb 17, 2023

+1 for this, it means (I think) that people will find it easier to keep in sync w/Docsy if they can just disable the styles they don't want rather than having to reapply patches?

@chalin
Copy link
Collaborator Author

chalin commented Feb 22, 2023

Yes, that in particular.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design/style Front-end site design / styling e0-minutes Effort < 60 min enhancement New feature or request p2-medium
Projects
None yet
Development

No branches or pull requests

2 participants