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

A better way to customize basic style #235

Closed
Kikobeats opened this issue Jun 16, 2020 · 0 comments
Closed

A better way to customize basic style #235

Kikobeats opened this issue Jun 16, 2020 · 0 comments

Comments

@Kikobeats
Copy link
Member

Kikobeats commented Jun 16, 2020

Right now is a bit complicated setup custom style for card look and feel from the vanilla connector:

   <style>
    .microlink_hover,
    .microlink_card,
    .microlink_hover:hover,
    .microlink_card:hover {
      background: #1A1A1A !important;
      color: white;
    }

    .microlink_hover {
      border-color: #666 !important;
    }

    .microlink_hover:hover {
      border-color: #999 !important;
    }

   </style>

It's necessary to use !importannt because the styled is encapsulated into the react wrapper so you can't override it directly.

A better approach there could move basic CSS properties into CSS variables, easy overwriting the default value:

<style>
:root {
  --microlink-card-bg-color: black;
  --microlink-card-color: white;
  --microlink-card-border-color: #666;
  --microlink-card-border-hover-color: #999;
}
</style>

That should be also a simple way for supporting theming out of the box, resolving #81

@Kikobeats Kikobeats changed the title [react] A better way to customize basic style A better way to customize basic style Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant