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

Responsive Text Colors #26553

Closed
nk2580 opened this issue May 22, 2018 · 10 comments
Closed

Responsive Text Colors #26553

nk2580 opened this issue May 22, 2018 · 10 comments

Comments

@nk2580
Copy link

nk2580 commented May 22, 2018

Wondering if anyone has had a crack at making the text color classes work with the breakpoints.

MY USE CASE:
when on a mobile the text content of a column wraps onto a different background. as the text is white, you can no longer see the content

PROPOSED ADDITIONAL CLASSES:
text-sm-white
text-sm-primary
text-sm-secondary
etc..

Anyone have any strong opinions against?

@Daniel217D
Copy link

If your css code change background by media queries, why you can't change text color? So also it have to add classes .bg-sm-black, but this classes are very specific and there is standart bootstrap color palette

@browner12
Copy link
Contributor

it seems like a very edge case, and it has the potential to add a considerable amount of generated classes.

I guess my opinion would be unless we can show that this is an issue more people run into, I would vote against.

@patrickhlauke
Copy link
Member

I'd say no, this is a lot of work/extra classes for very minimal general purpose usefulness. Closing, unless @mdo feels otherwise...

@nk2580
Copy link
Author

nk2580 commented Jun 5, 2018

So let me get this straight here? You guys have a feature request... without setting a time limit on assessing the validity of the request (or even entertaining the idea of a PR) you simply close the issue and wait for @mdo to comment otherwise?

@nk2580
Copy link
Author

nk2580 commented Jun 5, 2018

@browner12 completely agree with that approach. Is there a way to open a poll on new features so we can determine if this is worth it?

I can say from the uses I have (multiple projects) this is definitely something I get requests for often (i just compile an extension when the other devs / designers complain)

@bderblatter-qualtrics
Copy link

@nk2580 if you're extending Bootstrap (I would recommend it if you really need features like this) you can add it yourself without too much trouble. Here's a similar solution for responsive borders that you can use to help you out. I even modified that one in my project to make border gradient direction responsive, so the sky's the limit.

@nk2580
Copy link
Author

nk2580 commented Mar 21, 2019

Ended up making my own package

@ghost
Copy link

ghost commented Nov 21, 2019

I've landed here after seeing if there was any discussion of using background colours with breakpoints, for example setting bg-primary on any from small and above.

I have to agree with @nk2580 that the whole process of immediately denying any discussion and closing requests without asking for other opinions is a common thing here, and it's one that really gets to me.

Is there any current or future polling process that could be used to ask fellow users / developers about new features (rather than listing them as issues, or PR)?

@bderblatter-qualtrics
Copy link

@leecollings not that I know of; Bootstrap seems to be pretty top down from what I've seen. It is pretty easy to extend though. You can copy and modify some of the functions to make responsive text colors, background colors, and anything else really. That's what I've done at least.

@febrez
Copy link

febrez commented May 19, 2021

I use this :

@each $breakpoint in map-keys($grid-breakpoints) {
    @include media-breakpoint-up($breakpoint) {
        $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
        @each $prop, $abbrev in (background-color: bg, color: text) {
            @each $theme-color,
            $length in $theme-colors {
                .#{$abbrev}#{$infix}-#{$theme-color} {
                    #{$prop}: $length !important;
                }
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants