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

SVG and CSS transform #318

Closed
NtuFlorimond opened this issue May 23, 2017 · 2 comments
Closed

SVG and CSS transform #318

NtuFlorimond opened this issue May 23, 2017 · 2 comments

Comments

@NtuFlorimond
Copy link

Hello,

I have noticed that only ONE transform is taken into account when trying to "chain" them with class.
SVG example :
<text class="line_2 column_4">no existing document </text>
With CSS like :

.line_2 {
transform: translate(0,690px);
-ms-transform: translate(0,690px); /* IE 9 */
-webkit-transform: translate(0,690px); /* Safari and Chrome */
-o-transform: translate(0,690px); /* Opera */
-moz-transform: translate(0,690px); /* Firefox */
}
.column_4 {
transform: translate(120px,0);
-ms-transform: translate(120px,0); /* IE 9 */
-webkit-transform: translate(120px,0); /* Safari and Chrome */
-o-transform: translate(120px,0); /* Opera */
-moz-transform: translate(120px,0); /* Firefox */
}

Any way to improve this ?

@BigBadaboom
Copy link
Contributor

That's not the way CSS works. Properties are not additive like that. You might consider doing something like:

<g class="line_2">
  <text class="column_4">no existing document </text>
</g>

@dstorey
Copy link
Member

dstorey commented May 2, 2018

Closing this as doesn't require SVG changes

@dstorey dstorey closed this as completed May 2, 2018
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

No branches or pull requests

3 participants