Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D Datahub
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 51
    • Issues 51
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ICAT
  • Datahub
  • Merge requests
  • !415

Merged
Created Aug 25, 2020 by Axel Bocciarelli@bocciareMaintainer

Clean up and reorganise global styles

  • Overview 6
  • Commits 8
  • Pipelines 2
  • Changes 45

With Bootstrap 4 (and 5) on the horizon, I thought it best to give all the global styles a bit of a look.


First, a reminder:

  • with import './App.css', the styles are imported globally and apply to the entire app;
  • with import styles from './App.module.css', the styles are imported as CSS modules -- every class in App.module.css is namespaced and can only be used through the locally imported styles object: styles.myWrapper.

Here is the gist of this MR:

  • Remove a lot of unused stylesheets and styles.
  • Convert a few simple global styles to CSS modules (e.g. Menu.module.css and BreadCrumbs.module.css instead of Menu.css).
  • Move the remaining global styles to a new src/styles folder and import them all from index.css -- global styles imported from components are hidden away and prone to naming conflicts and unwanted overrides.
  • Convert a few component classes to functions and fix a couple of bugs that I found along the way.

It'll probably be clearer to look at the commits individually than at the whole diff.

Edited Aug 25, 2020 by Axel Bocciarelli
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: global-styles