Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-36960 - fix broken horizontal positioning of titles for docked bl…

…ocks
  • Loading branch information...
commit 62434c8a5351784beaf8642da8b08df594fc1ad3 1 parent 8663b09
@amygroshek amygroshek authored danpoltawski committed
Showing with 4 additions and 1 deletion.
  1. +1 −1  blocks/dock.js
  2. +3 −0  theme/base/style/dock.css
View
2  blocks/dock.js
@@ -516,7 +516,7 @@ M.core_dock.fixTitleOrientation = function(item, title, text) {
// We need to fix a font-size - sorry theme designers.
var fontsize = '11px';
var transform = (clockwise) ? 'rotate(90deg)' : 'rotate(270deg)';
- var test = Y.Node.create('<h2><span style="font-size:'+fontsize+';position:absolute;">'+text+'</span></h2>');
+ var test = Y.Node.create('<h2><span class="transform-test-node" style="font-size:'+fontsize+';">'+text+'</span></h2>');
this.nodes.body.insert(test, 0);
var width = test.one('span').get('offsetWidth') * 1.2;
var height = test.one('span').get('offsetHeight');
View
3  theme/base/style/dock.css
@@ -42,3 +42,6 @@ body.has_dock {margin-left:30px;}
.dir-rtl #dock {left:auto;right: 0%; border-left: 1px solid #DDD;}
.dir-rtl #dock .dockedtitle { border-bottom: 1px solid #DDD;border-top: 1px solid #EEE; cursor: pointer;}
body.dir-rtl.has_dock {margin-left: 0px; margin-right: 30px}
+
+/* Test span used to calculate positioning of docked item labels */
+.transform-test-node { position:absolute;line-height:normal; }
Please sign in to comment.
Something went wrong with that request. Please try again.