Toast icon indicating copy to clipboard operation
Toast copied to clipboard

Can't center grid columns in small/medium device-widths

Open tombyers opened this issue 9 years ago • 0 comments

I want to center a .grid__col--m-2-of-3 column. But it looks like this selector:

@media (max-width: $toast-breakpoint-medium) and (min-width: $toast-breakpoint-small) {
  &[class*="#{$toast-grid-column-namespace}--m-"] {
    display: inline-block;
    margin-right: -.24em;
  }
   ... 
}

is overriding the display:block; margin-right:auto; of .grid__col--centered. Hence I can't center the column.

Inspector screenshot below:

screen shot 2017-02-01 at 10 10 15

Is this a bug or am I missing something? Why is the display:inline-block selector necessary? Surely these declarations are by default inherited from .grid__col anyhow?

Thanks

tombyers avatar Feb 01 '17 10:02 tombyers