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

Add passage tags to passage-card element using data-tags #1438

Open
2 of 3 tasks
hituro opened this issue Aug 16, 2023 · 3 comments
Open
2 of 3 tasks

Add passage tags to passage-card element using data-tags #1438

hituro opened this issue Aug 16, 2023 · 3 comments
Labels
enhancement New feature or request P3 (could) Annoying bugs that have workarounds, Interesting ideas

Comments

@hituro
Copy link

hituro commented Aug 16, 2023

Is your feature request related to a problem? Please describe.

Now that we have user.css I'd love to be able to style my passages differently based on their tags, but sadly that data isn't represented anywhere on the html structure.

Describe the solution you'd like.

Add a data-tags attribute to the passage-card element with a space separated list of passage tags so that custom user.css can target them.

Describe alternatives you've considered.

I tried using :has() to target a passage based on the colour of its tags, but Electron 18 doesn't support :has() so that's out.

Additional context on this suggestion.

No response

Presubmission checklist

  • I am interested in working on code that would implement this feature request. (This is not required to submit a suggestion.)
  • I have done a search and believe that an issue does not already exist for this idea in the GitHub repository.
  • I have read and agree to abide by this project's Code of Conduct.
@hituro hituro added the enhancement New feature or request label Aug 16, 2023
@klembot klembot added the P3 (could) Annoying bugs that have workarounds, Interesting ideas label Aug 26, 2023
@klembot
Copy link
Owner

klembot commented Aug 26, 2023

The next minor release of Twine will include an Electron version bump, FWIW. I would target latest available when that happens.

@rubynguyen1510
Copy link
Contributor

Hello @klembot ,

While my friend and I were trying to fix this issue, we found in the Twine documentation that the HTML output of passagedata already has tags attribute. Does it mean that this issue can be closed without doing anything?

image

@hituro
Copy link
Author

hituro commented Jan 26, 2024

@rubynguyen1510 You have misunderstood the issue. This is not about placing an attribute on the exported HTML, but on the actual editor window when using Twine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3 (could) Annoying bugs that have workarounds, Interesting ideas
Projects
None yet
Development

No branches or pull requests

3 participants