Skip to content

Commit

Permalink
Merge pull request #31 from eea/develop
Browse files Browse the repository at this point in the history
Set color as css variable (--*)
  • Loading branch information
razvanMiu authored Oct 19, 2021
2 parents cd39905 + 1db4a60 commit 23dc281
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
22 changes: 8 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [3.5.1](https://github.com/eea/volto-block-style/compare/3.5.0...3.5.1)

- Set color as css variable (--*) [`77bd3c4`](https://github.com/eea/volto-block-style/commit/77bd3c44dd65c0df1879d7e5780700337185c44c)

#### [3.5.0](https://github.com/eea/volto-block-style/compare/3.4.5...3.5.0)

> 25 September 2021
- Various improvements [`#30`](https://github.com/eea/volto-block-style/pull/30)
- Various improvements [`#29`](https://github.com/eea/volto-block-style/pull/29)
- Release 3.5.0 [`0a5a98e`](https://github.com/eea/volto-block-style/commit/0a5a98e531f93470956673e50b6c71f37f59b49e)
- Add Sonarqube tag using ims-frontend addons list [`30bb3aa`](https://github.com/eea/volto-block-style/commit/30bb3aa5f49ed5264cf609d6b8f234b07b7988ca)

#### [3.4.5](https://github.com/eea/volto-block-style/compare/3.4.4...3.4.5)

Expand Down Expand Up @@ -86,10 +92,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Add range slider [`8a91ef1`](https://github.com/eea/volto-block-style/commit/8a91ef168df01e4a0f114596d50a401a14a41251)
- Separate block wrapping; don't apply multiple times [`2adffd5`](https://github.com/eea/volto-block-style/commit/2adffd58a99af59bb42d72c54f2a05be3b9b2ea1)
- Separate block wrapping; don't apply multiple times [`584e7a9`](https://github.com/eea/volto-block-style/commit/584e7a9859c7d417708f9aa78b83e94547f2f1ab)
- Add Sonarqube tag using frontend addons list [`f6737ef`](https://github.com/eea/volto-block-style/commit/f6737ef68ba906c5fb72e18c77b060aa82ed0a73)
- Add Sonarqube tag using frontend addons list [`6a4c6c1`](https://github.com/eea/volto-block-style/commit/6a4c6c16acc88471279a82a62b92555dc1ac20cc)
- Add Sonarqube tag using frontend addons list [`2101b55`](https://github.com/eea/volto-block-style/commit/2101b550588402b37cd91b5d582e27a6255d6cac)
- Add Sonarqube tag using frontend addons list [`2583c68`](https://github.com/eea/volto-block-style/commit/2583c68ea49ddbedc7b90b9d477cbbe4e2b779fd)
- Add hidden toggle [`3b8ed26`](https://github.com/eea/volto-block-style/commit/3b8ed26a82c31ff430301adceea1174e92464a77)
- Add a clear button to the box size widget [`4bdf803`](https://github.com/eea/volto-block-style/commit/4bdf8030d7a4d39d3a48b56ed6c8cddc311b3ff7)

Expand Down Expand Up @@ -117,9 +119,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
> 4 June 2021
- Develop [`#16`](https://github.com/eea/volto-block-style/pull/16)
- Cleanup Jenkinsfile [`dfa2790`](https://github.com/eea/volto-block-style/commit/dfa2790afb144f8a38fc0f3459ff37bb9bc4352c)
- Bump minor release [`a571d9e`](https://github.com/eea/volto-block-style/commit/a571d9ea1c4ac026af6eb973fe0b3386e4941466)
- Jenkins dependencies [`90f047b`](https://github.com/eea/volto-block-style/commit/90f047b644e0bf8d20bda7452eb68175f13bb3a8)
- Moved ScreenSize extras to volto-resize-helper [`d5f5ce4`](https://github.com/eea/volto-block-style/commit/d5f5ce47856b5abee3e1a1e1a01dfcedd9f6ea50)

#### [3.2.5](https://github.com/eea/volto-block-style/compare/3.2.4...3.2.5)
Expand All @@ -145,7 +145,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

> 29 April 2021
- [JENKINS] - Auto-release pipeline [`#12`](https://github.com/eea/volto-block-style/pull/12)
- Automated release testing [`1974270`](https://github.com/eea/volto-block-style/commit/1974270dda70ac184221da5178ec278ee9807481)
- Fix SSR ReferenceError: navigator is not defined [`59ccff6`](https://github.com/eea/volto-block-style/commit/59ccff65603f825a84a156b972035272872abd63)
- Fix maximize to screen height on mobile devices [`ea777a7`](https://github.com/eea/volto-block-style/commit/ea777a7e661a7d293dc4c2d8668dec6b986b3579)

Expand Down Expand Up @@ -245,15 +245,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
> 8 March 2021
- Release 2.1.0 [`1d247a6`](https://github.com/eea/volto-block-style/commit/1d247a624262ff801434954fb68aff6b2a5416c9)
- Cleanup DEPENDENCIES from Jenkinsfile [`9675cac`](https://github.com/eea/volto-block-style/commit/9675cac49c58f2cd62f582e816468f61d2d25103)

### [2.0.0](https://github.com/eea/volto-block-style/compare/1.1.0...2.0.0)

> 25 February 2021
- Volto 12 update: config -> @plone/volto/registry [`#7`](https://github.com/eea/volto-block-style/pull/7)
- Release 2.0.0 [`434180d`](https://github.com/eea/volto-block-style/commit/434180d516a0c94794b722d1a05fca7b8aff604e)
- JENKINS: volto-addon-ci update [`2bd2512`](https://github.com/eea/volto-block-style/commit/2bd25129d334b4f35d1f93c349d120dec439b8dd)

#### [1.1.0](https://github.com/eea/volto-block-style/compare/1.0.3...1.1.0)

Expand Down Expand Up @@ -282,7 +280,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
> 16 November 2020
- Release 1.0.1 [`71298d5`](https://github.com/eea/volto-block-style/commit/71298d59f68f3c1138a8a71a6a6372c7575f8d41)
- [JENKINS] - Fix SONAR tags [`4feed37`](https://github.com/eea/volto-block-style/commit/4feed37db9dae96103994ac1232c021595cf6f51)

### [1.0.0](https://github.com/eea/volto-block-style/compare/0.1.1...1.0.0)

Expand All @@ -293,11 +290,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Fix docs about dependencies [`416b97e`](https://github.com/eea/volto-block-style/commit/416b97e9e2f17dcd2a1036249f4321ab697cc53f)
- Update docs [`ac5849d`](https://github.com/eea/volto-block-style/commit/ac5849d4c750e9c232920148a49a0ae5047ef6b1)
- React color ~2.18.1 [`597da25`](https://github.com/eea/volto-block-style/commit/597da253f5266ecc9d0d6e10ee4d365432433416)
- [JENKINS] - Fix style [`2165eec`](https://github.com/eea/volto-block-style/commit/2165eecc051b4604618fcad91a8195e239e705c8)
- [JENKINS] - Add Jenkins; release-it; bootstrap [`fb681f2`](https://github.com/eea/volto-block-style/commit/fb681f2594e135d87ef02452116d4d5c91b50b1a)
- Cleanup [`8fb40cf`](https://github.com/eea/volto-block-style/commit/8fb40cf4fe721cc26120ab1231d48c4c9eab88a9)
- Fix README screenshot path [`81f09ec`](https://github.com/eea/volto-block-style/commit/81f09ec9d95b3a555d0bc7e0aa3ad08b4ab005db)
- yarn prettier [`04f3b9a`](https://github.com/eea/volto-block-style/commit/04f3b9ae36ea8c6d99dad1f6d4cf56e81c032e1a)

#### [0.1.1](https://github.com/eea/volto-block-style/compare/0.1.0...0.1.1)

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pipeline {
environment {
GIT_NAME = "volto-block-style"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,clms.land.copernicus.eu,biodiversity.europa.eu,www.eea.europa.eu-ims"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,clms.land.copernicus.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.eu"
DEPENDENCIES = ""
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-block-style",
"version": "3.5.0",
"version": "3.5.1",
"description": "volto-block-style: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
11 changes: 9 additions & 2 deletions src/StyleWrapper/StyleWrapperView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,15 @@ const h2rgb = (hex) => {
export function getInlineStyles(data, props = {}) {
return {
...(data.hidden && props.mode !== 'edit' ? { display: 'none' } : {}),
...(data.backgroundColor ? { backgroundColor: data.backgroundColor } : {}),
...(data.textColor ? { color: data.textColor } : {}),
...(data.backgroundColor
? {
backgroundColor: data.backgroundColor,
'--background-color': data.backgroundColor,
}
: {}),
...(data.textColor
? { color: data.textColor, '--text-color': data.textColor }
: {}),
...(data.textAlign ? { textAlign: data.textAlign } : {}),
...(data.fontSize
? { fontSize: data.fontSize, lineHeight: getLineHeight(data.fontSize) }
Expand Down

0 comments on commit 23dc281

Please sign in to comment.