Flagsmith / Flagsmith/flagsmith
Remove Bootstrap dependencies
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 567
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 121
Description
A lot of styles are inherited from bootstrap.
Migrating the tokens and defining the base theme will already remove relying partly from bootstrap base styles.
However, it is unrealistic to migrate away from bootstrap css in one-go.
The idea is to progressively migrate the css, bootstrap tokens, into using our own base-theme.
**Example deactivating bootstrap wildly**
Some components heavily relying on Bootstrap at the moment should remain untouched until they are fully reworked or most of bootstrap basics have been removed (cf Members/Groups/roles). Their migration is not hard but time-consuming and for now low prio.
Taking the nav bar as an example, the steps to get away from bootstrap would be:
1. `d-flex -> flex` uses tailwind directive
2. `align-items-center` -> `items-center` custom css/bootstrap classes uses tailwind directive
Example `NavSubLink`:
```
Before
import React, { FC, ReactNode } from 'react'
import { LinkProps, NavLink } from 'react-router-dom'
import { IonIcon } from '@ionic/react'
import classNames from 'classnames'
type NavSubLinkType = LinkProps & {
icon: string | ReactNode
children: ReactNode
}
const NavSubLink: FC = ({ children, icon, ...rest }) => {
return (
{typeof icon === 'string' ? : icon}
{children}
)
}
export default NavSubLink
After
const NavSubLink: FC = ({ children, icon, ...rest }) => {
return (
{typeof icon === 'string' ? : icon}
{children}
)
}
```
Contributor guide
Assessment
This issue has not been assessed yet.