diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c2af79..fbc2555 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add `--farmos-map-accent-color` CSS property. #186 + +### Fixed + +- Fix color scheme compliance of remaining icons. #181 + ### Changed - Improve interaction and control docs. #185 diff --git a/README.md b/README.md index f271d9c..1d099ff 100644 --- a/README.md +++ b/README.md @@ -616,6 +616,16 @@ all the behaviors from `farmOS.map.behaviors` have finished being attached to th ## Advanced Integration +### Accent color + +The farmOS-map accent color can be changed with the `--farmos-map-accent-color` custom CSS property. + +```css +#farm-map { + --farmos-map-accent-color: #336633; +} +``` + ### Working with farmOS-map in an NPM/Webpack Project Some integration scenarios require farmOS-map to be modeled as a dependency - i.e. so static analysis can diff --git a/src/styles.css b/src/styles.css index 32191f4..61e4643 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,14 +1,18 @@ /* Control color. */ +:root { + --farmos-map-accent-color: green; +} + .ol-control { background-color: rgba(255, 255, 255, 0.25); } .ol-control svg { - fill: green; + fill: var(--farmos-map-accent-color); } .ol-control button { - color: green; + color: var(--farmos-map-accent-color); background-color: rgba(255, 255, 255, 0.8); }