| 1 |
<?php |
| 2 |
namespace Depicter\Document\CSS; |
| 3 |
|
| 4 |
|
| 5 |
class Breakpoints |
| 6 |
{ |
| 7 |
const DESKTOP = 'default'; |
| 8 |
const TABLET = 'tablet'; |
| 9 |
const MOBILE = 'mobile'; |
| 10 |
|
| 11 |
const DESKTOP_SIZE = ''; |
| 12 |
const TABLET_SIZE = '1024'; |
| 13 |
const MOBILE_SIZE = '767'; |
| 14 |
|
| 15 |
public static function names(){ |
| 16 |
return array_keys( self::all() ); |
| 17 |
} |
| 18 |
|
| 19 |
public static function all(){ |
| 20 |
return [ |
| 21 |
self::DESKTOP => self::DESKTOP_SIZE, |
| 22 |
self::TABLET => self::TABLET_SIZE, |
| 23 |
self::MOBILE => self::MOBILE_SIZE |
| 24 |
]; |
| 25 |
} |
| 26 |
|
| 27 |
protected static function getSize( $breakpoint_name = 'default' ){ |
| 28 |
if( isset( self::all()[ $breakpoint_name ] ) ){ |
| 29 |
return self::all()[ $breakpoint_name ]; |
| 30 |
} |
| 31 |
return ''; |
| 32 |
} |
| 33 |
} |
| 34 |
|