question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`bg=` should map to `background` not `background-color`?

See original GitHub issue

Is your feature request related to a problem? Please describe.

Right now the bg= shorthand property seems to map to background-color. But this makes it confusing when you want to change a background from a color to a gradient. You might think you can just change:

bg="gray.500"

To:

bg="linear-gradient(...)"

But that would result in CSS of:

background-color: linear-gradient(...);

Which fails, because it maps to background-color instead of background.

Describe the solution you’d like

Instead of mapping bg= to background-color, it should map to background. I think there’s no downside here, since colors can always be passed directly to background and work as intended?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
segunadebayocommented, Feb 15, 2020

This also makes sense @ianstormtaylor. We’ll look into it.

1reaction
segunadebayocommented, Jun 30, 2020

@ianstormtaylor This has been fixed in the v1 pre-release. We’ll publish v1 officially soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Given a `<map>` with a background image, how can I color ...
I've just tried to add a inline CSS for bg-color and it worked. It'll be linked (at least so far) but it'll do...
Read more >
How to change geo analytic map background color fr...
I have created below layout and default background color is GRAY, I could not change the BG color through tool: GrayMap.png.
Read more >
map viewer background color - Esri Community
Is it possible to change the map background color in the map viewer? By default, it's white color. I am not talking about...
Read more >
Background · Bootstrap v5.0
Convey meaning through background-color and add decoration with gradients. On this page. Background color; Background gradient; Sass. Variables; Map; Mixins ...
Read more >
background-color - CSS: Cascading Style Sheets | MDN
The uniform color of the background. It is rendered behind any background-image that is specified, although the color will still be visible ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found