terriajs icon indicating copy to clipboard operation
terriajs copied to clipboard

Styled components remove the ability to finely customise appearance

Open steve9164 opened this issue 3 years ago • 4 comments

Currently we support customising the CSS of specific elements in globals.scss of a TerriaMap: https://github.com/TerriaJS/TerriaMap/blob/100f4f285a880afdf76330905a75dc286269bda4/lib/Views/global.scss#L17-L154

For example AREMI uses this: https://github.com/TerriaJS/aremi-natmap/blob/3f8c7f4bcf841d60da843e17bda4d440a1893ecd/lib/Views/global.scss#L16-L69

This support will slowly be eroded as we convert components from using CSS modules and Sass to styled-components and they lose their tjs-... class names.

We have a couple of options:

  • Acknowledge this loss of customisability and add options to styled components theming system to compensate
  • Add class names to styled components. If we want to use this for our managed maps we'll have to work out a way to load custom per-map css

steve9164 avatar Jan 22 '21 05:01 steve9164