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

feat: add 'copy css' button to tools/border-image-generator #174

Merged
merged 4 commits into from
May 8, 2024

Conversation

webcrawls
Copy link
Contributor

@webcrawls webcrawls commented Mar 25, 2024

Description:

This PR adds a 'click to copy' button to the CSS code output of the Border Image Generator tool.

Motivation:

I'm proposing this change as it improves the QOL of the border image tool, especially when rapidly iterating various options for border images. The copy button is out of the way and shouldn't interfere with any existing workflows.

Additional details:

  • The button is styled to maintain consistency with the rest of the document. Firefox reports an accessibility error due to a low text contrast of 4.58, however, the same error is raised for other existing text elements, so I figure this is OK to leave as-is.

Related issues and pull requests:

  • I couldn't find any related GitHub issues
  • I couldn't find any related pull requests
  • This PR doesn't depend on other branches

This is my first PR to mdn/css-examples (or, any mdn repository), so I apologize if I've missed any contributing steps! Let me know if there's any issues - I'm happy to make any necessary changes :)

* `mousedown` triggers for both right and middle-clicks, which does not align with the UX of a button. `onclick` is a more 'canonical' option.
@webcrawls webcrawls requested a review from a team as a code owner March 25, 2024 00:08
@webcrawls webcrawls requested review from pepelsbey and removed request for a team March 25, 2024 00:08
@webcrawls webcrawls changed the title Feat/border image generator copy css Mar 25, 2024
@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Apr 24, 2024
Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

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

That’s a great idea :) Thank you!

@pepelsbey pepelsbey merged commit eff2d4b into mdn:main May 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Issues and pull requests with no activity for three months.
2 participants