/**
* Adds inline CSS styles
* @param $style_css Mixed: inline CSS
- * @param $flip Boolean: Whether to flip the CSS if needed
+ * @param $flip False or String: Set to 'flip' to flip the CSS if needed
*/
public function addInlineStyle( $style_css, $flip = false ) {
- if( $flip && $this->getLang()->isRTL() ) {
+ if( $flip === 'flip' && $this->getLang()->isRTL() ) {
# If wanted, and the interface is right-to-left, flip the CSS
$style_css = CSSJanus::transform( $style_css, true, false );
}
$rules[] = "/* @noflip */body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto; bottom:4px;}"; # Hides from IE
}
$style = implode( "\n", $rules );
- $out->addInlineStyle( $style, /* flip css if RTL */true );
+ $out->addInlineStyle( $style, 'flip' );
}
}
$rules[] = "a.stub:after { $underline; }";
}
$style = implode( "\n", $rules );
- $out->addInlineStyle( $style, /* flip css if RTL */true );
+ $out->addInlineStyle( $style, 'flip' );
}
}
if ( 2 == $qb ) { # Right
$rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }";
- $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-left: 4px; margin-right: 152px; }";
+ $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }";
} elseif ( 1 == $qb || 3 == $qb ) {
$rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }";
- $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-left: 152px; margin-right: 4px; }";
+ $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }";
if( 3 == $qb ) {
$rules[] = "/* @noflip */#quickbar { position: fixed; padding: 4px; }";
}
} elseif ( 4 == $qb ) {
$rules[] = "/* @noflip */#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}";
$rules[] = "/* @noflip */#quickbar { border-right: 1px solid gray; }";
- $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-right: 152px; margin-left: 4px; }";
+ $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }";
}
$style = implode( "\n", $rules );
- $out->addInlineStyle( $style, /* flip css if RTL */true );
+ $out->addInlineStyle( $style, 'flip' );
}
}