fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

DetailsRow styling cleanup

Open phkuo opened this issue 7 years ago • 1 comments

DetailsRow styles can be cleaned up a bit.

padding: ${blah}px is unnecessary because padding accepts number values

root uses AnimationClassNames, but instead should mix in AnimationStyles directly instead root also has text-align:left which should already be the default

The DetailsRowField component has several ternary operator-based classNames applied, that kind of logic should be moved to the *.styles.ts.

Things like this:

        selectors: {
          '&.$checkCell': {
            paddingRight: 0
          }
        }

should be moved out of selectors and into the checkCell blob. We shouldn't have logic in selectors that can be done in the className itself.

defaultCellStyles are applied in multiple places on classNames that are all eventually mixed together, leading to unnecessary duplication. This should only need to appear once on cell and nowhere else.

    checkCover: [
      {
...
        display: 'none'
      },

      anySelected && {
        display: 'block'
      }
    ],

Just move anySelected up as a ternary operator.

Font styles should mix in the font style object from the theme, not just pull the size by itself.

phkuo avatar May 02 '19 21:05 phkuo

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

msft-fluent-ui-bot avatar May 24 '21 16:05 msft-fluent-ui-bot