Skip to content

TintableSvgButton styling#5605

Merged
rxl881 merged 5 commits intodevelopfrom
rxl881/invertOutlineColour
Nov 15, 2017
Merged

TintableSvgButton styling#5605
rxl881 merged 5 commits intodevelopfrom
rxl881/invertOutlineColour

Conversation

@rxl881
Copy link
Copy Markdown
Contributor

@rxl881 rxl881 commented Nov 15, 2017

background-color: darkred;
}

.mx_TintableSvgButton {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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