Skip to content

Commit

Permalink
feat: make remBase configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Nov 20, 2023
1 parent 578c34d commit 52854dd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ public function init()
$this->alfredCache = $this->wire(new WireData());

// JS defaults
$this->remBase = 16; // default base for px-->rem conversion
// set the remBase either from config setting or use 16 as fallback
$this->remBase = $this->remBase ?: 16;
$this->initPostCSS();

// watch this file and run "migrate" on change or refresh
Expand Down Expand Up @@ -2520,6 +2521,13 @@ private function configSettings($inputfields)
$f->notes = $this->showFontFileSize();
$fs->add($f);

$f = new InputfieldInteger();
$f->name = 'remBase';
$f->label = 'REM base font size';
$f->value = $this->remBase;
$f->notes = 'See [this forum thread for more info](https://processwire.com/talk/topic/29268-fr-make-rembase-a-config-setting/)';
$fs->add($f);

$f = $this->wire->modules->get('InputfieldCheckboxes');
$f->name = 'features';
$f->label = "Features";
Expand Down

0 comments on commit 52854dd

Please sign in to comment.