Skip to content

Commit

Permalink
refactor: run prettier on all sass files in /assets (#29164)
Browse files Browse the repository at this point in the history
* refactor: run prettier on all sass files in /assets

* fix formatting for _z-index.scss
  • Loading branch information
flootr committed Dec 6, 2018
1 parent 09643f7 commit a4bbda6
Show file tree
Hide file tree
Showing 35 changed files with 465 additions and 289 deletions.
93 changes: 62 additions & 31 deletions assets/stylesheets/_main.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
/**
* General styles
*
* @format
*/

.wpcom-site__logo {
fill: $gray-lighten-20;
position: fixed;
top: 50%;
left: 50%;
top: 50%;
left: 50%;
transform: translate( -50%, -50% );

@include breakpoint( ">960px" ) {
@include breakpoint( '>960px' ) {
width: 100px;
height: 100px;
}
Expand All @@ -27,15 +29,24 @@
z-index: z-index( 'root', '.wpcom-site__global-noscript' );
}


/* =Global
----------------------------------------------- */

@-webkit-viewport { width : device-width; }
@-moz-viewport { width : device-width; }
@-ms-viewport { width : device-width; }
@-o-viewport { width : device-width; }
@viewport { width : device-width; }
@-webkit-viewport {
width: device-width;
}
@-moz-viewport {
width: device-width;
}
@-ms-viewport {
width: device-width;
}
@-o-viewport {
width: device-width;
}
@viewport {
width: device-width;
}

// make sure layout can fill the viewport
html,
Expand All @@ -45,7 +56,7 @@ body,
}

* {
-webkit-tap-highlight-color: rgba( 0, 0, 0, 0);
-webkit-tap-highlight-color: rgba( 0, 0, 0, 0 );
}

body {
Expand All @@ -54,7 +65,7 @@ body {

// This fixes an issue with the `click-outside` package not working on mobile.
// Specifically, this makes clicking outside a popover work on touch devices. -shaun
@include breakpoint( "<660px" ) {
@include breakpoint( '<660px' ) {
cursor: pointer;
}
}
Expand Down Expand Up @@ -88,14 +99,14 @@ body.rtl,
}

/*rtl:ignore*/
:lang(he) body.rtl,
:lang(he) .rtl button,
:lang(he) .rtl input,
:lang(he) .rtl select,
:lang(he) .rtl textarea,
:lang(he) .rtl .button,
:lang(he) .rtl #footer,
:lang(he) .rtl #footer a.readmore {
:lang( he ) body.rtl,
:lang( he ) .rtl button,
:lang( he ) .rtl input,
:lang( he ) .rtl select,
:lang( he ) .rtl textarea,
:lang( he ) .rtl .button,
:lang( he ) .rtl #footer,
:lang( he ) .rtl #footer a.readmore {
font-family: $sans;
}

Expand Down Expand Up @@ -126,11 +137,16 @@ body {
noscript {
text-align: center;
margin-top: 3em;
display:block;
display: block;
}

/* Headings */
h1,h2,h3,h4,h5,h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
clear: both;
}
hr {
Expand All @@ -144,7 +160,8 @@ hr {
p {
margin-bottom: 1.5em;
}
ul, ol {
ul,
ol {
margin: 0 0 1.5em 3em;
}
ul {
Expand All @@ -153,7 +170,10 @@ ul {
ol {
list-style: decimal;
}
ul ul, ol ol, ul ol, ol ul {
ul ul,
ol ol,
ul ol,
ol ul {
margin-bottom: 0;
margin-left: 1.5em;
}
Expand All @@ -163,10 +183,14 @@ dt {
dd {
margin: 0 1.5em 1.5em;
}
b, strong {
b,
strong {
font-weight: 600;
}
dfn, cite, em, i {
dfn,
cite,
em,
i {
font-style: italic;
}
blockquote {
Expand All @@ -188,16 +212,21 @@ pre {
overflow: auto;
max-width: 100%;
}
code, kbd, tt, var {
code,
kbd,
tt,
var {
font: 15px $code;
}
abbr, acronym {
abbr,
acronym {
border-bottom: 1px dotted $gray-darken-20;
cursor: help;
// Prevent double underline in Chrome
text-decoration: none;
}
mark, ins {
mark,
ins {
background: lighten( $alert-yellow, 23% );
text-decoration: none;
}
Expand All @@ -218,7 +247,10 @@ th {
font-weight: 600;
}

.hide, .hidden { display: none; }
.hide,
.hidden {
display: none;
}

/* Links */
a,
Expand All @@ -236,11 +268,10 @@ a:active {
.link--caution:visited,
.is-link.link--caution,
.is-link.link--caution:visited {

&,
&:hover,
&:focus,
&:active {
&:active {
color: $alert-red;
}
}
Expand Down
8 changes: 5 additions & 3 deletions assets/stylesheets/_vendor.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/** @format */

// External Dependencies
@import '../../node_modules/react-virtualized/styles';
@import '../../node_modules/draft-js/dist/Draft';
Expand All @@ -6,15 +8,15 @@
fill: currentColor;

&.needs-offset g {
transform: translate( 1px, 1px ); /* translates to .5px because it's in a child element */
transform: translate( 1px, 1px ); /* translates to .5px because it's in a child element */
}

&.needs-offset-x g {
transform: translate( 1px, 0 ); /* only nudges horizontally */
transform: translate( 1px, 0 ); /* only nudges horizontally */
}

&.needs-offset-y g {
transform: translate( 0, 1px ); /* only nudges vertically */
transform: translate( 0, 1px ); /* only nudges vertically */
}
}

Expand Down
39 changes: 18 additions & 21 deletions assets/stylesheets/directly.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/** @format */

// Directly's Real Time Messaging (RTM) widget is an on-demand customer support tool.
// Read more about the RTM widget and how it's used in Calypso in the `lib/directly` README.
//
Expand Down Expand Up @@ -87,42 +89,40 @@ textarea {
}

// Form inputs
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type='text'],
input[type='password'],
input[type='email'],
input[type='tel'],
input[type='number'],
input[type='url'],
textarea {
@extend %form-field;
-webkit-font-smoothing: subpixel-antialiased;

&::-webkit-input-placeholder {
color: $gray;
}

}
textarea {
vertical-align: inherit;
}

.minimized-view,
.maximized-view {
background: #F2F6F8;
background: #f2f6f8;
}
.minimized-view {
background: $white;
box-shadow: 0 1px 10px rgba(46,68,83,.1);
box-shadow: 0 1px 10px rgba( 46, 68, 83, 0.1 );
border: 1px solid lighten( $gray, 25% );
}
.maximized-view.is-ask-view {
top: 0;
}
.message-list-transition-wrapper {
background: #F2F6F8;
background: #f2f6f8;
}


/* HEADER */

.header-container {
Expand Down Expand Up @@ -169,7 +169,6 @@ textarea {
}
}


/* CHAT LIST (opens with the hamburguer button on header) */

.chat-list-view-container {
Expand Down Expand Up @@ -212,7 +211,6 @@ textarea {
}
}


/* ASK QUESTION (opens from chat list) */

.ask-question-form-container {
Expand Down Expand Up @@ -242,7 +240,6 @@ textarea {
}
}


/* THREAD */

.thread-view-container {
Expand All @@ -265,9 +262,9 @@ textarea {
&:after {
// Triangle for the corner
position: absolute;
top: 0;
right: -10px;
content: "";
top: 0;
right: -10px;
content: '';
display: block;
width: 0;
height: 0;
Expand All @@ -287,9 +284,9 @@ textarea {
&:after {
// Triangle for the corner
position: absolute;
top: 0;
left: -10px;
content: "";
top: 0;
left: -10px;
content: '';
display: block;
width: 0;
height: 0;
Expand Down Expand Up @@ -332,7 +329,7 @@ textarea {
// Green border for success messages
&.success {
border-color: $alert-green;
background: #DCEEE5;
background: #dceee5;
}

// Green background for highlighted success messages
Expand Down
2 changes: 2 additions & 0 deletions assets/stylesheets/editor.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/** @format */

@import 'shared/colors';
@import 'shared/typography';
@import 'shared/mixins/breakpoints';
Expand Down
Loading

0 comments on commit a4bbda6

Please sign in to comment.