Semantic-UI icon indicating copy to clipboard operation
Semantic-UI copied to clipboard

[UI] Add Responsive Helper Classes

Open ronnross opened this issue 11 years ago • 72 comments

I'm using semantic beta

I have an element That I only want to show in mobile view only. For example,

`

Save
`

This element shows in computer, tablet, and mobile views.

ronnross avatar Sep 23 '14 13:09 ronnross

Hi @ronnross,

As far as I know the "mobile only" classes currently only work inside a ui grid in conjunction with the row and column tags. See an example of how it works here:

http://beta.semantic-ui.com/collections/grid.html#responsive-to-device

mzbyszynski avatar Sep 23 '14 14:09 mzbyszynski

@mzbyszynski it looks like you are correct. Is there an equivalent to bootstraps hidden-XX class in semantic? I'm looking to hide elements at a more granular level than grid/row conjunction.

ronnross avatar Sep 23 '14 14:09 ronnross

Right now I don't think there is, but it sounds like a good idea to me :+1:

See #1066, that includes some workarounds suggested by @CharlesOkwuagwu as well.

mzbyszynski avatar Sep 23 '14 15:09 mzbyszynski

@ronnross It seems a lot of people want to use this, but I've been a bit stubborn about "free floating" ui helper classes in Semantic UI since the spirit of the project is to define variations in the context of each element.

jlukic avatar Sep 23 '14 15:09 jlukic

@jlukic I respect the decision to not have "free floating" ui helper classes. What are your thoughts about having mobile, tablet, computer only classes under each collection? For example, the menu collection would allow for "mobile only" classes. This would keep them within the context of the parent collection e.g., form, grid, menu. Am I way off base?

ronnross avatar Sep 23 '14 15:09 ronnross

I think it makes sense to support it in the menu at least.

Right now i'm looking for a solution to showing a large button for search on mobile while on the desktop showing the whole search bar and afaik i can't do that without manually adding a mediaquery breakpoint.

tmikaeld avatar Mar 03 '15 19:03 tmikaeld

+1 for at least supporting it in the menu.

PLPeeters avatar Mar 08 '15 10:03 PLPeeters

Would be a good feature, hiding things like icons or text as a page gets smaller is handy.

Ehesp avatar Apr 02 '15 22:04 Ehesp

So, when this will be ready to use?

pateketrueke avatar Apr 08 '15 19:04 pateketrueke

Haven't started any development, probably a while.

jlukic avatar Apr 08 '15 22:04 jlukic

+1 for hidden-xx

ch3m1c avatar May 04 '15 11:05 ch3m1c

Have we gotten anywhere on this? Need someone to develop it? I love Semantic UI, but this seems to be the one huge thing missing. I will implement it if it's not at the top of anyone else's priority list.

watzon avatar Jun 09 '15 02:06 watzon

It would be great if Semantic UI has an equivalent for Zurb Foundation's Media Queries :) http://foundation.zurb.com/docs/media-queries.html

arvi avatar Jun 10 '15 02:06 arvi

Named breakpoint variables are built into Semantic UI, you can use them in your own custom less.

jlukic avatar Jun 10 '15 03:06 jlukic

+1

listepo avatar Aug 04 '15 11:08 listepo

+1

lancetw avatar Aug 13 '15 18:08 lancetw

+1

mamluka avatar Aug 29 '15 16:08 mamluka

+1 ~~~ would be great if can conveniently hide any image, label or other elements .

rachellji avatar Sep 02 '15 20:09 rachellji

+1 On this, would be really helpful

prijindal avatar Sep 12 '15 22:09 prijindal

+10000 on this!

KonsoltCorp avatar Sep 14 '15 03:09 KonsoltCorp

+1

FernandoMueller avatar Sep 15 '15 02:09 FernandoMueller

+1

hnordt avatar Oct 02 '15 16:10 hnordt

+1 would be a great addition

prijindal avatar Oct 03 '15 04:10 prijindal

+1

insign avatar Oct 13 '15 05:10 insign

+1

koddr avatar Oct 13 '15 07:10 koddr

+1

btbjosh avatar Oct 15 '15 21:10 btbjosh

+1

purplecones avatar Oct 16 '15 18:10 purplecones

+1

jurikern avatar Oct 25 '15 20:10 jurikern

+1

YamiOdymel avatar Oct 28 '15 13:10 YamiOdymel

I have made my own super simple responsive css(only css) Taking the semantic default breakpoint

/* Mobile */

@media only screen and (max-width: 767px) {
    .mobile-hide{
        display: none !important;
    }
}

/* Tablet */

@media only screen and (min-width: 768px) and (max-width: 991px) {
    .tablet-hide{
        display: none !important;
    }
}

/* Small Monitor */

@media only screen and (min-width: 992px) and (max-width: 1199px) {
    .small-hide{
        display: none !important;
    }
}


/* Large Monitor */

@media only screen and (min-width: 1200px) {
    .large-hide{
        display: none !important;
    }
}

Whn you youse one of this class element is hiden on specific screen size. Simple, but works for me :)

Jur4iks avatar Oct 29 '15 11:10 Jur4iks