Skip to content

Commit

Permalink
Override stylesheets in PHP XHTML formats (#97)
Browse files Browse the repository at this point in the history
Let the --css option override the default stylesheets for all PHP XHTML-based formats.

Co-authored-by: haszi <haszika80@gmail.com>
  • Loading branch information
haszi and haszi authored Feb 13, 2024
1 parent bdbd0e6 commit 2f71e8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 0 additions & 5 deletions phpdotnet/phd/Package/PHP/ChunkedXHTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ public function __construct() {
parent::__construct();
$this->registerFormatName("PHP-Chunked-XHTML");
$this->setExt(Config::ext() === null ? ".html" : Config::ext());

Config::setCss(array(
'http://www.php.net/styles/theme-base.css',
'http://www.php.net/styles/theme-medium.css',
));
}

public function __destruct() {
Expand Down
7 changes: 7 additions & 0 deletions phpdotnet/phd/Package/PHP/XHTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ public function __construct() {
$this->mytextmap = array_merge(parent::getDefaultTextMap(), static::getDefaultTextMap());
$this->dchunk = array_merge(parent::getDefaultChunkInfo(), static::getDefaultChunkInfo());
$this->registerPIHandlers($this->pihandlers);

if (Config::css() === []) {
Config::setCss(array(
"http://www.php.net/styles/theme-base.css",
"http://www.php.net/styles/theme-medium.css",
));
}
}

public function getDefaultElementMap() {
Expand Down

0 comments on commit 2f71e8e

Please sign in to comment.