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

TintableSvgButton styling #5605

Merged
merged 5 commits into from
Nov 15, 2017
Merged

TintableSvgButton styling #5605

merged 5 commits into from
Nov 15, 2017

Conversation

rxl881
Copy link
Contributor

@rxl881 rxl881 commented Nov 15, 2017

@@ -332,3 +332,30 @@ textarea {
border: 1px solid gray;
background-color: darkred;
}

.mx_TintableSvgButton {
Copy link
Member

Choose a reason for hiding this comment

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

I'm very surprised that the TintableSvgButton CSS was wrong, and i'm failing to see why this is needed? What's the story? :)

Copy link
Member

Choose a reason for hiding this comment

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

oh, having read the react-sdk stuff this makes a bit more sense. thinks

Copy link
Member

Choose a reason for hiding this comment

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

okay, i'm still a bit confused - is this just because you can't put alt text on an <object/>? surely cursor: pointer could work on an <object/>?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, it's mainly because you can't put alt text on the svg. The path element of the svg also overrides cursor styling of the object / svg.

We could do the styling overrides in custom CSS. However, it seems like a fairly standard occurrence that we would want tintable SVGs to behave in the same way as standard "img" elements, so why not just add it here, along with the title text overlay?

Copy link
Member

Choose a reason for hiding this comment

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

ok, lgtm. still dubious about having two spans introduced though (as per other PR)

Copy link
Contributor Author

@rxl881 rxl881 Nov 15, 2017

Choose a reason for hiding this comment

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

"surely cursor: pointer could work on an ?"

(Just to clarify) Nope, that doesn't work, you'd have to apply the styling on the underlying path element(s)

@rxl881 rxl881 assigned ara4n and unassigned ara4n Nov 15, 2017
@rxl881 rxl881 merged commit 53a793b into develop Nov 15, 2017
@rxl881 rxl881 deleted the rxl881/invertOutlineColour branch November 15, 2017 18:35
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