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

Replace qiskit-card-item directive with simpler qiskit-card directive #415

Merged
merged 16 commits into from
Jun 23, 2023

Conversation

Eric-Arellano
Copy link
Collaborator

@Eric-Arellano Eric-Arellano commented Jun 23, 2023

With qiskit-card-item, we expected you to have raw HTML in your RST file with specific CSS classes so that everything would work correctly. That was an antipattern, and not necessary since a card is an independent visual unit that doesn't depend on its siblings.

Now, users only specify qiskit-card in their RST.

This PR also simplifies the HTML and CSS structure for the element:

  • Removes unused CSS classes.
  • Removes the tags option for the directive. It was unused in production.
  • Renames CSS classes to use the format qiskit-card-x.
  • Moves all CSS into our custom classes, rather than using generic classes like .card-body that won't exist in Furo.

This will make #327 simpler.

Before:
before

After (my viewport changes a little):

after

Copy link
Collaborator

@javabster javabster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@Eric-Arellano Eric-Arellano merged commit 57c4bee into Qiskit:main Jun 23, 2023
4 checks passed
@Eric-Arellano Eric-Arellano deleted the simplify-qiskit-card branch June 23, 2023 18:46
Eric-Arellano added a commit that referenced this pull request Jun 29, 2023
#415 accidentally
broke `qiskit-card` being clickable.

But the code wasn't accessible, to begin with. It's an antipattern to
make a `<div>` clickable. Instead, we should use the semantic web with
an `<a>` element.

Pytorch renders the same as before:

![Screenshot 2023-06-29 at 2 38 53
PM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/c9d66f39-cfc8-4b18-bcad-3daebee9eee4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants