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: Spacers based on breakpoints

See original GitHub issue

It would be nice to have spacers based on breakpoints. E.g.

.pa-xs-1 (apply padding all x1 on xs and above)
.mt-md-2 (apply a margin top x2 only on md and above)
  • What will it allow you to do that you can’t do today? Apply margins and padding based on breakpoints.

  • How will it make current work-arounds straightforward? Standard way of implementing spacers across applications.

  • What potential bugs and edge cases does it help to avoid? Would prevent custom classes in applications. Backwards compatibility with pa-1, mt-2, etc. might be an issue?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
jacekkarczmarczykcommented, Apr 14, 2018

Personally i’m not completely against it, especially after @KaelWD mentioned recently that image

The main reason against it is that covering all cases (text alignment, spacing 0-5/top/bottom/left/right/all/x/y, elevations and many more, each for 5 different breakpoints) would result in increasing the css size by quite a big amount. Maybe the solution would be to create a separate css (one with all features or 1 css per feature) that could be imported on demand, so for example elevations wouldn’t be responsive until you import responsive-elevations.css when you really need it.

Having said that this issue has been closed not because we don’t like the feature but because it’s a duplicate, so please comment in the original issue

2reactions
bmndscommented, Apr 14, 2018

I think this issue shouldn’t have been closed. Here is why:

  • The proposed solution would allow us to use classes directly, this way:
<v-flex xs12 sm6 text-xs-center text-sm-right px-sm-3>
  <v-btn large to="/meetups" class="secondary">Explore Meetups</v-btn>
</v-flex>
  • Whereas #1434 imposes a solution using the breakpoint object programmatically, like this:
<v-flex xs12 sm6
    :class="{
      'text-left px-3' : this.$vuetify.breakpoint.smAndUp,
      'text-center': this.$vuetify.breakpoint.xsOnly
    }">
  <v-btn large to="/meetup/new" class="secondary">Organize Meetup</v-btn>
</v-flex>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flexible Spacer Block - Wordpress plugin - Common Ninja
Flexible Spacer Block switches the height of the spacer according to the device screen width (breakpoints). This block has two variable breakpoints, ...
Read more >
Spacing | Red Hat design system
Spacers used in complex layouts may change values from large to small breakpoints and vice versa, depending on the screen real estate.
Read more >
react-responsive-spacer - npm package - Snyk
That's it! Now you can create space between your components specific to breakpoints. react-responsive-spacer dependencies. reactreact-dom ...
Read more >
Flex - PatternFly 4
The Flex layout is a tool to build your own custom layout that builds-in the PatternFly spacer and breakpoint systems. This enables developers...
Read more >
Optimizing your site for mobile (responsive testing) - Semplice
Note: The "Spacer Column" will not occupy vertical space on mobile breakpoints. Troubleshooting. Why doesn't the responsive view match the live ...
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