entitlementcard icon indicating copy to clipboard operation
entitlementcard copied to clipboard

Add Tailwind CSS to administration module

Open seluianova opened this issue 10 months ago • 1 comments

Is your feature request related to a problem? Please describe. I have a suggestion to use tailwind css classes instead of separate react components that only contain styling. For example, this component:

const UnFocusedDiv = styled.div`
  display: flex;
  align-items: center;
  flex: 1;
  :focus {
    outline: none;
  }
  height: 25px;
`

could be turned into:

<div className='flex items-center flex-1 focus:outline-none h-6'>...</div>

Maybe it's a matter of personal preference, but IMO looks leaner and less code is easier to maintain. Feel free to object.

Describe the solution you'd like Add a new dependency, replace style-only-components with tailwind classes

Describe alternatives you've considered Leave as is

Additional context https://tailwindcss.com/docs/installation

seluianova avatar Apr 23 '24 14:04 seluianova

Before i joined digitalfabrik, i was also using different css framework and styled components were quite new and not common. I think the biggest pro argument for us was that we can use it in React and React Native more or less equally (except of that some css features don't exist in react native and won't be translated) I think styled components are quite strong and easy to understand and we use it in several projects. I don't see the big benefit to refactor the whole project. You can even create base components and make inheritance and everything. It's just a matter of usage

f1sh1918 avatar Apr 23 '24 15:04 f1sh1918