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.

[Feature Request] Negative elevation

See original GitHub issue

Problem to solve

The elevation-classes are an excellent helper. However in some cases, it would be useful to create an ‘negative’ elevation (lets call it depression).

My use-case is a container for search-results, that has limited height and is scrolling on overflow. I want the container to behave like elevated but with shadow set to inset instead.

Proposed solution

Create new Classes for ‘negative’ elevation, mirroring the behavior of already present elevetion-classes but with box-shadow set to inset instead of outset.

Example Naming pattern:

  • positive elevation (unchanged): elevation-{n} (n: 0-24)
  • negative elevation: elevation--{n} (n: 0-24)
  • negative elevation (alternative): depression-{n} (n: 0-24)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
canducommented, Jan 30, 2020

@sense-it-gmbh I’m not a maintainer of this excellent library, but I’d guess the reasoning is as follows:

  • the Material Design spec doesn’t really specify negative elevations;
  • not many users want this, and CSS tree-shaking isn’t really a thing, so for most Vuetify users this would be added CSS weight for no benefit.

That said: you can use inset as described here to make inset box shadows. For example:

.elevation-n1 {
  box-shadow:
    inset 0 2px 1px -1px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px 0 rgba(0, 0, 0, 0.14),
    inset 0 1px 3px 0 rgba(0, 0, 0, 0.12) !important;
}

Here I’ve taken the .elevation-1 style and just added inset to the beginning of each shadow in the box-shadow value.

0reactions
frederikheldcommented, Dec 6, 2022

I’d like to have this feature as well but I understand that this is not a priority.

@sense-it-gmbh You say that you already have the solution. Why don’t you just submit a PR that adds the feature? Your name says that you’re a company, so you profit from using this free stuff. Would be a nice to give some thing back every once in a while.

Read more comments on GitHub >

github_iconTop Results From Across the Web

distinguish between negative elevation values for sea vs. land ...
Issue 35824695 · Feature request: distinguish between negative elevation values for sea vs. land locations · Issue summary · Add comment · Issue...
Read more >
The elevation surface in a 3D scene blocks some features
Features may be blocked by the elevation surface in a 3D scene because those features contain negative elevations.
Read more >
Sweet Home 3D / Feature Requests / #166 Elevation of walls
It would be great to have positive and negative elevation of walls. This would allow to draw cellars, overlays, staricases, etc.
Read more >
Add a link to Google Earth for altitude information
Platform(s): website Description of need: When identifying observations, the altidude is ofthen an essential information. Feature request ...
Read more >
Elevation Service | Maps JavaScript API - Google Developers
The ElevationService object communicates with the Google Maps API Elevation Service which receives elevation requests and returns elevation data.
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