Socialify

Folder ..

Viewing _design-system-config.scss
481 lines (362 loc) • 14.1 KB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
// Sass variables: adapt them to your designs globally

// base size for text
$base-font             : 14 !default; // if "14" then 1em = 14px
// default line-height
$l-h                   : 1.5 !default;

$size-h1               : 36 !default;
$size-h2               : 28 !default;
$size-h3               : 20 !default;
$size-h4               : 18 !default;
$size-h5               : 17 !default;
$size-h6               : 16 !default;

// Use typo helpers on demand
$use-other-typo-helpers       : true !default;
$use-other-line-height-helpers: true !default;

$size-smallest         : 9 !default;
$size-smaller          : 10 !default;
$size-small            : 12 !default;
$size-big              : 16 !default;
$size-bigger           : 18 !default;
$size-biggest          : 20 !default;

// fonts
$font-family           : -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif !default;
$font-family-monospace : SFMono-Regular,Consolas,"Liberation Mono","Menlo",monospace,monospace !default;
// explanation for double monospace http://code.iamkate.com/html-and-css/fixing-browsers-broken-monospace-font-handling/

// project colors
$pm-global-grey        : #262a33 !default;
$pm-global-altgrey     : #3c414e !default;
$bluish-grey           : #9799a6 !default;
$pm-global-light       : #f6f7fa !default;
$pm-global-border      : #dde6ec !default;
$pm-global-muted       : #eeeff3 !default;
$pm-global-info        : #008cff !default;
$pm-global-success     : #5db039 !default;
$pm-global-warning     : #ec5858 !default;
$pm-global-attention   : #eac819 !default;
$pm-blue               : #657ee4 !default;
$pm-blue-dark          : #526ee0 !default;
$pm-blue-light         : #788ee8 !default;
$pm-blue-gradient      : linear-gradient(130deg, #657ee4 -7%, #7351d1 64%, #7350d1 127%);

$white                 : #fff !default;
$black                 : #000 !default;

$pv-green              : #4da358 !default;
$pv-green-dark         : #3e8447 !default;
$pv-green-light        : #5fb364 !default;

// plans
$visionary             : #6ddcfb !default;
$plus                  : #c6e422 !default;
$professional          : #d4b46e !default;
$vpnbasic              : #f67f60 !default;
$vpnplus               : #9ccc23 !default;

// primary
$pm-primary            : $pm-blue !default;
$pm-primary-light      : $pm-blue-light !default;
$pm-primary-dark       : $pm-blue-dark !default;

// not approved colors
$pm-input-background   : #fcfdff !default;
$plan-logo-color       : #8ed60f !default;
$conversation-selected-bg: rgba($pm-blue, .5) !default;
$input-shadow-color    : rgba(0, 0, 0, 0.16) !default;
$autocomplete-bg-color-hover : #f4f4f4 !default;
$text-sub-header       : #767676 !default;

// needed for darkmode
$pm-secondary-grey     : #2e323d !default;
$pm-tertiary-grey      : #505560 !default; // border input

// needed globally
$calendar-selected-day-color: $pm-blue-light !default;
$calendar-today-color: $pm-primary-dark !default;

$navigation-hover-bg-color: rgba(white, .05) !default;

// colors
$color-links           : $pm-primary !default;
$color-hover           : $black !default;
$color-hr              : $pm-global-border !default;
$hr-height             : 1px !default;
$color-alert           : $pm-global-warning !default;
$color-bg-button       : $white !default;
$color-txt-button      : $black !default;

$global-border-radius  : 3px !default;

// inputs
$input-defaut-border   : $pm-global-border !default;

// main breakpoints
$breakpoint-large      : 1500 !default;
$breakpoint-medium-landscape : 1100 !default;
$breakpoint-medium     : 910 !default;
$breakpoint-small      : 680 !default;
$breakpoint-tiny       : 450 !default;

// RTL
$rtl-option            : false !default;
// RTL = Right To Left =>
// to adapt a website in a language that is written from right to left
// designed for multilingual websites with LTR et RTL

// Custom scrollbar everywhere
$custom-scroll         : true !default;


// hyphens
$hyphenation           : false !default;

// clear floats
$use-clearleft_right   : false !default;
$use-clearhidden       : false !default;
$use-clearfix          : false !default;

// color reset for mark tag
$use-color-reset-mark  : true !default;
$default-bgColor-mark  : #ff0 !default;


// vertical rhythm
// possible values     : 'double_top_single_bottom', 'single_top_single_bottom', 'single_top', 'single_bottom'
$vertical-rhythm        : 'single_bottom' !default;

// units for typo
// possible values     : 'use_em',  'use_rem', 'use_rem_with_em_fallback'
$typo-unit             : 'use_rem' !default;

// applies 62.5% on html (to make 10px default font size), simplifies rem calculation
$root-equiv-10-px      : true !default;

// basic premise: default user setting for font size is at 16 pixels in the browser
// you should NEVER update this value, however… who can predict the future…
$root-default-font-size: 16 !default;

// applies main colors on body tag
$apply-body-styles     : true !default;

// others
$use-reset-button      : true !default;
$use-ie-calc-font-fallback: false !default;
$use-old-ie-fallbacks  : true !default;
$use-height-auto-img   : true !default;
$use-height-auto-td    : true !default;
$use-height-auto-table : true !default;

// default config for webpack, can be overriden by "global config" in styles-pm.scss
$path-images           : '../../assets/img/shared/' !default;


// variables for global layouts, allowing you to use calc for components and adapt quickly if needed
$header-height         : 8rem !default;
$width-sidebar         : 24rem !default; // main navigation
$toolbar-height        : 5rem !default;
$context-bar-width     : 25vw !default; // context bar on the right
$context-bar-min-width : 30rem !default;
$context-bar-max-width : 40rem !default;

$default-height-fields : 3.5rem !default;

$conversations-column-width: 35% !default;  // used also to align search bar on top

$pm-label-width: 18em !default;


// Sass functions: don’t touch if you are not sure ;)

@function em($px, $base: $base-font) {

  @return ($px / $base) * 1em;

}

@function rem($px, $reset-applied: $root-equiv-10-px, $user-default-font-size: $root-default-font-size) {

  @if ( $reset-applied == true ) {
      @return ($px / 10) * 1rem;
  }
  @else {
         @return ($px / $user-default-font-size) * 1rem;
		}

}


// calculated via https://rocssti.net/en/builder-css
// based on http://soqr.fr/vertical-rhythm/ thanks @goetter & @eQRoeil

@function line-height ($font-size, $base-height, $base-font, $type-vr) {

  $coef: ceil(1 / ($base-height * $base-font / $font-size));
  $height: ($base-font * $base-height / $font-size) ;

  @return ($height * $coef) ;

}


@function margin-em ($font-size, $base-height, $base-font, $type-vr) {

  $coef: ceil(1 / ($base-height * $base-font / $font-size));
  $other_coef: ceil($base-height * $base-font / $font-size);
  $height: ($base-font * $base-height / $font-size) ;
  $margin: ($height * $coef );

  @if $type-vr == 'double_top_single_bottom' {
     @return ( ($margin * $other_coef)*1em 0 ( ($margin/2) * $other_coef) *1em 0 );
  }
  @if $type-vr == 'single_top_single_bottom' {
	@return ( ( ($margin/2) * $other_coef) *1em 0 );
  }
  @else if $type-vr == 'single_bottom' {
     @return ( 0 0 ( ($margin/2) * $other_coef) *1em 0 );
  }
  @else if $type-vr == 'single_top' {
     @return ( ( ($margin/2) * $other_coef) *1em 0 0 0 );
  }
  @else if $type-vr == 'double_top_double_bottom_without_coef' {
     @return (($margin *1em) 0);
  }
}


@mixin rhythm( $value, $type-vr: $vertical-rhythm, $type-unit: $typo-unit ){

  @if $type-unit == 'use_em' {
     font-size: em($value);
  }
  @else if $type-unit == 'use_rem' {
     font-size: rem($value);
  }
  @else if $type-unit == 'use_rem_with_em_fallback' {
     font-size: em($value);
     font-size: rem($value);
  }
  line-height: line-height($value, $l-h, $base-font, $type-vr);
  margin: margin-em($value, $l-h, $base-font, $type-vr) ;

}


@mixin vendor-prefix($property, $value, $prefixes: webkit moz ms o) {

  @if $prefixes {
    @each $prefix in $prefixes {
      #{'-' + $prefix + '-' + $property}: $value;
    }
  }
  #{$property}: $value;

}


@mixin color-opacity($color, $opacity: 0.9) {
    color: $color; /* The Fallback */
    color: rgba($color, $opacity);
}

@mixin background-opacity($color, $opacity: 0.9) {
    background-color: $color; /* The Fallback */
    background-color: rgba($color, $opacity);
}



// Replace `$search` with `$replace` in `$string`
// @author Hugo Giraudel
// @param {String} $string - Initial string
// @param {String} $search - Substring to replace
// @param {String} $replace ('') - New value
// @return {String} - Updated string
@function str-replace($string, $search, $replace: "") {
  $index: str-index($string, $search);

  @if $index {
    @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
  }

  @return $string;
}




// Generate margins
// example
// $list-margin: mt, mr, mb, ml, m;
// $list-margin-values: 0, 1, 2, 3; // specify 2.5 if needed

@mixin margin-generator ($list-margin, $list-margin-values, $prefix: "") {

  @each $margin-type in $list-margin {
     @each $margin in $list-margin-values {
        //$temp_m : str-slice($margin-type, 0, 1);
        $temp_t : str-slice($margin-type, 2, 3);

        $property: margin;

        @if $temp_t == t {
           $property: margin-top;
        } @else if $temp_t == r {
           $property: margin-right;
        } @else if $temp_t == b {
           $property: margin-bottom;
        } @else if $temp_t == l {
           $property: margin-left;
        }


        $value : $margin + 0em;
        /* #{$value} */

        @if $margin == 0 {
           $value : $margin;
        }

        // convert to string
        $text-margin: $margin + '';
        // 1.5 = 1-5
        $property-class: str-replace($text-margin, '.', '-');

        // . mr 1-5 { margin-right: 1.5em ;}
        .#{$prefix}#{$margin-type}#{$property-class} { #{$property}: #{$value}; }


        }
     }

}



// Generate paddings
// example
// $list-padding: pt, pr, pb, pl, p;
// $list-padding-values: 0, 1, 2, 3; // specify 2.5 if needed

@mixin padding-generator ($list-padding, $list-padding-values, $prefix: "") {

  @each $padding-type in $list-padding {
     @each $padding in $list-padding-values {
        //$temp_p : str-slice($padding-type, 0, 1);
        $temp_t : str-slice($padding-type, 2, 3);

        $property: padding;

        @if $temp_t == t {
           $property: padding-top;
        } @else if $temp_t == r {
           $property: padding-right;
        } @else if $temp_t == b {
           $property: padding-bottom;
        } @else if $temp_t == l {
           $property: padding-left;
        }

        $value : $padding + 0em;
        @if $padding == 0 {
           $value : $padding;
        }

        // convert to string
        $text-padding: $padding + '';
        // 1.5 = 1-5
        $property-class: str-replace($text-padding, '.', '-');

        .#{$prefix}#{$padding-type}#{$property-class} { #{$property}: #{$value}; }


        }
     }
}


//
// Responsive management in em
//

@mixin respond-to ($breakpoint, $query-type : 'max') {
  @if $query-type == "max" {
     @media (max-width: em($breakpoint, $root-default-font-size)) {
      @content;
    }
  }

  @else if $query-type == "min" {
     @media (min-width: em($breakpoint + 1, $root-default-font-size)) {
      @content;
    }
  }

  @else if $query-type == "height" {
     @media (max-height: em($breakpoint, $root-default-font-size)) {
      @content;
     }
  }

  @else if $query-type == "min-height" {
	@media (min-height: em($breakpoint, $root-default-font-size)) {
	 @content;
	}
 }

  @else  {
    @warn "Type non supported.";
  }
}


//
// body::before: to get current breakpoint in JS
//
@mixin body-before ($value-content, $display-none : false) {
  @if $value-content != "" {
    body::before {
      content: '#{$value-content}';
      @if $display-none == true {
        display: none;
      }
    }
  }
  @else  {
    @warn "$value-content not specified";
  }

}


//
// Easing functions for transitions and animations
// Learn more at http://easings.net/
//

@function easing($type: 'ease') {

	$value: '';

	@if      $type == 'linear'         { $value: '0, 0, 1, 1'; }
	@else if $type == 'ease'           { $value: '0.25, 0.1, 0.25, 1'; }
	@else if $type == 'easeIn'         { $value: '0.42, 0, 1, 1'; }
	@else if $type == 'easeOut'        { $value: '0, 0, 0.58, 1'; }
	@else if $type == 'easeInOut'      { $value: '0.42, 0, 0.58, 1'; }

	@else if $type == 'easeInSine'     { $value: '0.12, 0, 0.39, 0'; }
	@else if $type == 'easeInQuad'     { $value: '0.11, 0, 0.5, 0'; }
	@else if $type == 'easeInCubic'    { $value: '0.32, 0, 0.67, 0'; }
	@else if $type == 'easeInQuart'    { $value: '0.5 , 0, 0.75, 0'; }
	@else if $type == 'easeInQuint'    { $value: '0.64, 0, 0.78, 0'; }
	@else if $type == 'easeInExpo'     { $value: '0.7 , 0, 0.84, 0'; }
	@else if $type == 'easeInCirc'     { $value: '0.55, 0, 1, 0.45'; }
	@else if $type == 'easeInBack'     { $value: '0.36, 0, 0.66, -0.56'; }

	@else if $type == 'easeOutSine'    { $value: '0.61, 1, 0.88, 1'; }
	@else if $type == 'easeOutQuad'    { $value: '0.5, 1, 0.89, 1'; }
	@else if $type == 'easeOutCubic'   { $value: '0.33, 1, 0.68, 1'; }
	@else if $type == 'easeOutQuart'   { $value: '0.25, 1, 0.5, 1'; }
	@else if $type == 'easeOutQuint'   { $value: '0.22, 1, 0.36, 1'; }
	@else if $type == 'easeOutExpo'    { $value: '0.16, 1, 0.3, 1'; }
	@else if $type == 'easeOutCirc'    { $value: '0, 0.55, 0.45, 1'; }
	@else if $type == 'easeOutBack'    { $value: '0.34, 1.56, 0.64, 1'; }

	@else if $type == 'easeInOutSine'  { $value: '0.37, 0, 0.63, 1'; }
	@else if $type == 'easeInOutQuad'  { $value: '0.45, 0, 0.55, 1'; }
	@else if $type == 'easeInOutCubic' { $value: '0.65, 0, 0.35, 1'; }
	@else if $type == 'easeInOutQuart' { $value: '0.76, 0, 0.24, 1'; }
	@else if $type == 'easeInOutQuint' { $value: '0.83, 0, 0.17, 1'; }
	@else if $type == 'easeInOutExpo'  { $value: '0.87, 0, 0.13, 1'; }
	@else if $type == 'easeInOutCirc'  { $value: '0.85, 0, 0.15, 1'; }
	@else if $type == 'easeInOutBack'  { $value: '0.68, -0.6, 0.32, 1.6'; }

	@else { @error "'#{$type}' is not a correct value for easing()."; }

	@return cubic-bezier(unquote($value));
}