> For the complete documentation index, see [llms.txt](https://docs.ushahidi.com/platform-developer-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ushahidi.com/platform-developer-documentation/dev-legacy-v3/front-end-development/changing-ui-styles-introduction-to-the-pattern-library/grid-breakpoints-and-media-queries.md).

# Grid, Breakpoints, & Media Queries

The Ushahidi Platform grid system is built with [Neat](http://neat.bourbon.io/) by [Thoughtbot](https://thoughtbot.com/). Neat is a lightweight semantic grid framework for Sass and Bourbon.

## Links

* [Neat Examples](http://neat.bourbon.io/examples/)
* [Neat Docs](http://thoughtbot.github.io/neat-docs/latest/)

The Ushahidi Platform uses a mobile-first design approach, meaning we design with smaller devices as our default, then add components and adjust layouts as needed when the screen size increases. This approach allows the app to function and convey the appropriate information regardless of the user's device. It works on mobile phones and desktop computers alike.

## Breakpoints

The breakpoints are defined under *Grid* within [\_settings.scss](https://github.com/ushahidi/platform-pattern-library/blob/gh-pages/assets/sass/_settings.scss)

```
/*------------------------------------*\
    $GRID
\*------------------------------------*/

$grid-columns: 12;     # The number of columns in the grid
$gutter: 1.6888em;     # The width of margin between columns
$max-width: 1580px;    # The max width of the grid

// Breakpoint Widths
$mobile-min-width: (30em) !default; // 480px
$mobile-up-min-width: (30.063em) !default; // 481px
$small-min-width: (48em) !default; // 768px
$medium-min-width: (64em) !default; // 1024px
$large-min-width: (80em) !default; // 1280px
$xlarge-min-width: (90em) !default; // 1440px
$xxlarge-min-width: (120em) !default; // 1920px
$tall-min-height: (650px) !default; // for vertical breakpoints
$xtall-min-height: (850px) !default; // for vertical breakpoints -- taller

// Defined Breakpoints
// thoughtbot.github.io/neat-docs/latest/#new-breakpoint
$mobile: new-breakpoint(min-width $mobile-min-width);
$mobile-up: new-breakpoint(min-width $mobile-up-min-width);
$small: new-breakpoint(min-width $small-min-width);
$medium: new-breakpoint(min-width $medium-min-width);
$large: new-breakpoint(min-width $large-min-width);
$xlarge: new-breakpoint(min-width $xlarge-min-width);
$xxlarge: new-breakpoint(min-width $xxlarge-min-width);
$tall: new-breakpoint(min-width $small-min-width min-height $tall-min-height);
$xtall: new-breakpoint(min-height $xtall-min-height);
```

## How to Use

You can call a breakpoint with this *@include* syntax.

```
.class {
    // default mobile first styles

    @include media($small) {
        // $small styles - 768px and up
    }

    @include media($medium) {
        // $medium styles - 1024px and up
    }

    etc... {

    }

}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ushahidi.com/platform-developer-documentation/dev-legacy-v3/front-end-development/changing-ui-styles-introduction-to-the-pattern-library/grid-breakpoints-and-media-queries.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
