Picture of Chris Gillison
Setting device sizes
by Chris Gillison - Friday, 8 November 2019, 12:41 PM
 

Hi all.

Using the latest version of the framework, please could someone point me to the place where device sizes are set in Adapt as I need to tweak them?

In the generic.less file of the Vanilla theme you have the line:

@device-width-medium: unit(@adapt-device-medium, px);

I'm assuming @adapt-device-medium is 760 by default but I can't find where that value's being defined.

Many thanks.

Picture of Guy Willis
Re: Setting device sizes
by Guy Willis - Friday, 8 November 2019, 1:38 PM
 

Hi Chris,

The default device sizes are set in `dev/grunt/tasks/less.js`

To overwrite these values you can do the following:

If `theme.json` is present in `dev/src/theme/adapt-contrib-vanilla` you can change the `screenSize` values in here. Otherwise, if `theme.json` is not present you can add the following to `config.json` located in `dev/src/course`:

{
    "screenSize": {
        "small": 520,
        "medium": 760,
        "large": 900
    }
}
 
You will need to rebuild the project you're working on after editing these values.
 
All the best,
Guy
Picture of Chris Gillison
Re: Setting device sizes
by Chris Gillison - Friday, 8 November 2019, 1:44 PM
 

Perfect. Thanks Guy!