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

[Grid] Styles not able to override with CSS #321

Closed
kiaking opened this issue Jul 26, 2023 · 2 comments · Fixed by #323
Closed

[Grid] Styles not able to override with CSS #321

kiaking opened this issue Jul 26, 2023 · 2 comments · Fixed by #323
Assignees
Labels
bug Something isn't working

Comments

@kiaking
Copy link
Member

kiaking commented Jul 26, 2023

We should be able to define SGrid component style by using grid-template-column and gap but this is not possible now due to inline styling.

When props are not defined, it should not define the inline style.

// SGrid

const styles = computed(() => {
  // Oh no... It should be undefined instead of having default values.
  return {
    gridTemplateColumns: `repeat(${props.cols ?? 1}, minmax(0, 1fr))`,
    gap: `${props.gap ?? 0}px`
  }
})
@kiaking kiaking added the bug Something isn't working label Jul 26, 2023
@brc-dd
Copy link
Member

brc-dd commented Jul 26, 2023

we can probably refactor it to v-bind in css, that way it will be overridable by other styles. wdyt?

@kiaking
Copy link
Member Author

kiaking commented Jul 26, 2023

Oh yeah we can do that! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants