Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored overriding inline styles #566

Merged
merged 5 commits into from
Apr 24, 2015
Merged

Conversation

mmrtnz
Copy link
Contributor

@mmrtnz mmrtnz commented Apr 23, 2015

  • Refactored component inline-style structure.
    • Before components had a get function for each element that had inline-styles. Now, all inline-styles are contained in one function called getStyles(). This change was done to improve readability. Here is an example of what I mean:
// Before
_main: function() {
  return { /* inline styles for main */ };
},

_elementA: function() {
  return { /* inline styles for elementA */ };
},

...


// After
getStyles: function() {
  return {
    root: { /* inline styles for main */ },
    elementA: { /* inline styles for elementA */ },
    ...
  };
}
  • Remade merge functions of StylePropable
  • Created new utility file called Extend

mmrtnz added 5 commits April 20, 2015 10:05
…dded new styling function and tested it with checkbox.
…t style functions into a main style function called getStyles.
…), DropDownMenu (underline was not displaying), and Snackbar (would dismiss immediately after show).
styles.hint.opacity = 0;
}

if (this.props.floatingLabelText) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may resolve #569 #563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants