Skip to content

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

@tombyers

Description

@tombyers

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions