Firefox transform-origin on SVG still broken











up vote
1
down vote

favorite












When we apply a 2D CSS rotation to an SVG shape in Firefox (I'm on 63.0.1 - latest version), it gets misaligned. There are plenty of questions on this topic, eg. Setting transform-origin on SVG group not working in FireFox



I'm not seeing it as fixed, but perhaps I'm missing something. Best to look at my CodePen first: https://codepen.io/MSCAU/pen/GwozbO



Here's the gist of it:



circle {
fill: none;
transform-origin: center;
// transform-origin: 6px 6px; /* Makes no difference */
// transform-box: fill-box; /* Makes no difference */
}
circle:nth-child(1) {
stroke: red;
stroke-width: 2;
}
circle:nth-child(2) {
stroke: blue;
stroke-width: 1;
transform: rotate(-90deg);
}

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" width="120" height="120">
<circle cx="6" cy="6" r="5"/>
<circle cx="6" cy="6" r="5"/>
</svg>









share|improve this question


















  • 1




    Seems to be pixel snapping taking place a the wrong point. Multiplying everything by 10 fixes it. You should raise a bugzilla bug unless there already is one.
    – Robert Longson
    2 days ago










  • Yes. If I change the blue stroke-width to 0.1 or even 2 (matching the red circle), it all lines up a lot better.
    – MSC
    2 days ago












  • I have submitted the bug report: bugzilla.mozilla.org/show_bug.cgi?id=1505932
    – MSC
    yesterday















up vote
1
down vote

favorite












When we apply a 2D CSS rotation to an SVG shape in Firefox (I'm on 63.0.1 - latest version), it gets misaligned. There are plenty of questions on this topic, eg. Setting transform-origin on SVG group not working in FireFox



I'm not seeing it as fixed, but perhaps I'm missing something. Best to look at my CodePen first: https://codepen.io/MSCAU/pen/GwozbO



Here's the gist of it:



circle {
fill: none;
transform-origin: center;
// transform-origin: 6px 6px; /* Makes no difference */
// transform-box: fill-box; /* Makes no difference */
}
circle:nth-child(1) {
stroke: red;
stroke-width: 2;
}
circle:nth-child(2) {
stroke: blue;
stroke-width: 1;
transform: rotate(-90deg);
}

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" width="120" height="120">
<circle cx="6" cy="6" r="5"/>
<circle cx="6" cy="6" r="5"/>
</svg>









share|improve this question


















  • 1




    Seems to be pixel snapping taking place a the wrong point. Multiplying everything by 10 fixes it. You should raise a bugzilla bug unless there already is one.
    – Robert Longson
    2 days ago










  • Yes. If I change the blue stroke-width to 0.1 or even 2 (matching the red circle), it all lines up a lot better.
    – MSC
    2 days ago












  • I have submitted the bug report: bugzilla.mozilla.org/show_bug.cgi?id=1505932
    – MSC
    yesterday













up vote
1
down vote

favorite









up vote
1
down vote

favorite











When we apply a 2D CSS rotation to an SVG shape in Firefox (I'm on 63.0.1 - latest version), it gets misaligned. There are plenty of questions on this topic, eg. Setting transform-origin on SVG group not working in FireFox



I'm not seeing it as fixed, but perhaps I'm missing something. Best to look at my CodePen first: https://codepen.io/MSCAU/pen/GwozbO



Here's the gist of it:



circle {
fill: none;
transform-origin: center;
// transform-origin: 6px 6px; /* Makes no difference */
// transform-box: fill-box; /* Makes no difference */
}
circle:nth-child(1) {
stroke: red;
stroke-width: 2;
}
circle:nth-child(2) {
stroke: blue;
stroke-width: 1;
transform: rotate(-90deg);
}

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" width="120" height="120">
<circle cx="6" cy="6" r="5"/>
<circle cx="6" cy="6" r="5"/>
</svg>









share|improve this question













When we apply a 2D CSS rotation to an SVG shape in Firefox (I'm on 63.0.1 - latest version), it gets misaligned. There are plenty of questions on this topic, eg. Setting transform-origin on SVG group not working in FireFox



I'm not seeing it as fixed, but perhaps I'm missing something. Best to look at my CodePen first: https://codepen.io/MSCAU/pen/GwozbO



Here's the gist of it:



circle {
fill: none;
transform-origin: center;
// transform-origin: 6px 6px; /* Makes no difference */
// transform-box: fill-box; /* Makes no difference */
}
circle:nth-child(1) {
stroke: red;
stroke-width: 2;
}
circle:nth-child(2) {
stroke: blue;
stroke-width: 1;
transform: rotate(-90deg);
}

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" width="120" height="120">
<circle cx="6" cy="6" r="5"/>
<circle cx="6" cy="6" r="5"/>
</svg>






css firefox svg






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 days ago









MSC

1,57721524




1,57721524








  • 1




    Seems to be pixel snapping taking place a the wrong point. Multiplying everything by 10 fixes it. You should raise a bugzilla bug unless there already is one.
    – Robert Longson
    2 days ago










  • Yes. If I change the blue stroke-width to 0.1 or even 2 (matching the red circle), it all lines up a lot better.
    – MSC
    2 days ago












  • I have submitted the bug report: bugzilla.mozilla.org/show_bug.cgi?id=1505932
    – MSC
    yesterday














  • 1




    Seems to be pixel snapping taking place a the wrong point. Multiplying everything by 10 fixes it. You should raise a bugzilla bug unless there already is one.
    – Robert Longson
    2 days ago










  • Yes. If I change the blue stroke-width to 0.1 or even 2 (matching the red circle), it all lines up a lot better.
    – MSC
    2 days ago












  • I have submitted the bug report: bugzilla.mozilla.org/show_bug.cgi?id=1505932
    – MSC
    yesterday








1




1




Seems to be pixel snapping taking place a the wrong point. Multiplying everything by 10 fixes it. You should raise a bugzilla bug unless there already is one.
– Robert Longson
2 days ago




Seems to be pixel snapping taking place a the wrong point. Multiplying everything by 10 fixes it. You should raise a bugzilla bug unless there already is one.
– Robert Longson
2 days ago












Yes. If I change the blue stroke-width to 0.1 or even 2 (matching the red circle), it all lines up a lot better.
– MSC
2 days ago






Yes. If I change the blue stroke-width to 0.1 or even 2 (matching the red circle), it all lines up a lot better.
– MSC
2 days ago














I have submitted the bug report: bugzilla.mozilla.org/show_bug.cgi?id=1505932
– MSC
yesterday




I have submitted the bug report: bugzilla.mozilla.org/show_bug.cgi?id=1505932
– MSC
yesterday

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203532%2ffirefox-transform-origin-on-svg-still-broken%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203532%2ffirefox-transform-origin-on-svg-still-broken%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

Landwehr

Reims

Javascript gets undefined on array