Skip to content

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 feat: add 'copy css' button to tools/border-image-generator 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
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

idle Issues and pull requests with no activity for three months.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants