src/Seboettg/CiteProc/Styles/Css/CssStyle.php
private function init()
    {
        $lineSpacing = $this->bibliographyOptions->getLineSpacing();
        $entrySpacing = $this->bibliographyOptions->getEntrySpacing();
        $hangingIndent = $this->bibliographyOptions->getHangingIndent();

        if ($lineSpacing || $entrySpacing || $hangingIndent) {
            $rule = $this->cssRules->getRule(".csl-entry");
            if (!empty($lineSpacing)) {
                $rule->addDirective("line-height", intval($lineSpacing) . "em");
            }

            if (!empty($entrySpacing)) {
                $rule->addDirective("margin-bottom", intval($entrySpacing) . "em");
            }

            if (!empty($hangingIndent)) {
                $rule->addDirective("padding-left", "2em");
                $rule->addDirective("text-indent", "-2em");
            }
        }

        if ("flush" === $this->bibliographyOptions->getSecondFieldAlign()) {
            $rule = $this->cssRules->getRule(".csl-left-margin");
            $rule->addDirective("display", "block");
            $rule->addDirective("float", "left");

            $rule = $this->cssRules->getRule(".csl-right-inline");
            $rule->addDirective("margin-left", "35px");
        }
    }
private function init()
    {
        $lineSpacing = $this->bibliographyOptions->getLineSpacing();
        $entrySpacing = $this->bibliographyOptions->getEntrySpacing();
        $hangingIndent = $this->bibliographyOptions->getHangingIndent();

        if ($lineSpacing || $entrySpacing || $hangingIndent) {
            $rule = $this->cssRules->getRule(".csl-entry");
            if (!empty($lineSpacing)) {
                $rule->addDirective("line-height", intval($lineSpacing) . "em");
            }

            if (!empty($entrySpacing)) {
                $rule->addDirective("margin-bottom", intval($entrySpacing) . "em");
            }

            if (!empty($hangingIndent)) {
                $rule->addDirective("padding-left", "2em");
                $rule->addDirective("text-indent", "-2em");
            }
        }

        if ("flush" === $this->bibliographyOptions->getSecondFieldAlign()) {
            $rule = $this->cssRules->getRule(".csl-left-margin");
            $rule->addDirective("display", "block");
            $rule->addDirective("float", "left");

            $rule = $this->cssRules->getRule(".csl-right-inline");
            $rule->addDirective("margin-left", "35px");
        }
    }
private function init ( ) { $ lineSpacing = $ this -> bibliographyOptions -> getLineSpacing ( ) ; $ entrySpacing = $ this -> bibliographyOptions -> getEntrySpacing ( ) ; $ hangingIndent = $ this -> bibliographyOptions -> getHangingIndent ( ) ; if ( $ lineSpacing || $ entrySpacing || $ hangingIndent ) { $ rule = $ this -> cssRules -> getRule ( ".csl-entry" ) ; if ( ! empty ( $ lineSpacing ) ) { $ rule -> addDirective ( "line-height" , intval ( $ lineSpacing ) . "em" ) ; } if ( ! empty ( $ entrySpacing ) ) { $ rule -> addDirective ( "margin-bottom" , intval ( $ entrySpacing ) . "em" ) ; } if ( ! empty ( $ hangingIndent ) ) { $ rule -> addDirective ( "padding-left" , "2em" ) ; $ rule -> addDirective ( "text-indent" , "-2em" ) ; } } if ( "flush" === $ this -> bibliographyOptions -> getSecondFieldAlign ( ) ) { $ rule = $ this -> cssRules -> getRule ( ".csl-left-margin" ) ; $ rule -> addDirective ( "display" , "block" ) ; $ rule -> addDirective ( "float" , "left" ) ; $ rule = $ this -> cssRules -> getRule ( ".csl-right-inline" ) ; $ rule -> addDirective ( "margin-left" , "35px" ) ; } }
initialize CSS rules
initialize CSS rules