Skip to content

Commit

Permalink
option to set the token base styles #6
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiDittrich committed Apr 19, 2020
1 parent c703c82 commit 0e512c3
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 97 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Branch 2.X ##

### 2.2.0 ###

* Added: option to set the token base styles inlcuding font-size - feature requested [on GitHub](https://github.com/EnlighterJS/Plugin.ThemeCustomizer/issues/6)

### 2.1.0 ###

* Added: `wp-skltn` component wrapper around the settings elements
Expand Down
4 changes: 2 additions & 2 deletions dist/enlighterjs.customizer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "enlighterjs-theme-customizer",
"description": "an open source syntax highlighter written in pure javascript",
"version": "2.1.0",
"version": "2.2.0",
"private": true,
"homepage": "https://enlighterjs.org",
"author": {
Expand Down
4 changes: 3 additions & 1 deletion src/customizer/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ export const selectors = {
codegroup: '.enlighter-t-${THEME_NAME}.enlighter-v-codegroup .enlighter-codegroup-switch .enlighter-btn'
},

token: '.enlighter-t-${THEME_NAME} .enlighter-'
token: '.enlighter-t-${THEME_NAME} .enlighter-',

genericToken: '.enlighter-t-${THEME_NAME} .enlighter span'
}
15 changes: 15 additions & 0 deletions src/ui/views/token-generic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,25 @@ import * as React from 'dom-magic';

import {Token} from '../components/token.jsx';
import {Container} from '../components/container.jsx';
import {selectors} from '../../customizer/selectors';
import {Group} from '../components/group.jsx';
import {FontStyle} from '../elements/font-style.jsx';
import {FontWeight} from '../elements/font-weight.jsx';
import {FontColor} from '../elements/font-color.jsx';
import {FontSize} from '../elements/font-size.jsx';
import {BackgroundColor} from '../elements/bg-color.jsx';

export function TokenGenericView(){
return <Container className="ejs-customizer-token-generic">

<Group title="Token base style (applied to all tokens)">
<FontStyle selector={selectors.genericToken} />
<FontWeight selector={selectors.genericToken} />
<FontSize selector={selectors.genericToken} />
<FontColor selector={selectors.genericToken} />
<BackgroundColor selector={selectors.genericToken} />
</Group>

<Token type="g0" name="Generic Symbols" />
<Token type="g1" name="Brackets" />

Expand Down
93 changes: 0 additions & 93 deletions src/ui/views/tokens.jsx

This file was deleted.

0 comments on commit 0e512c3

Please sign in to comment.