Skip to content

Commit 1fb701d

Browse files
committed
Polish association bar styles
1 parent db2bf97 commit 1fb701d

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

packages/core/fields/association/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,19 +255,19 @@ class AssociationField extends Component {
255255
onChange={ this.handleSearchChange }
256256
/>
257257

258+
{
259+
isLoading
260+
? <span className="cf-association__spinner spinner is-active"></span>
261+
: ''
262+
}
263+
258264
<span className="cf-association__counter">
259265
{ sprintf(
260266
__( 'Showing %1$d of %2$d results', 'carbon-fields-ui' ),
261267
Number( options.length ),
262268
Number( totalOptionsCount )
263269
) }
264270
</span>
265-
266-
{
267-
isLoading
268-
? <span className="cf-association__spinner spinner is-active"></span>
269-
: ''
270-
}
271271
</div>
272272

273273
<div className="cf-association__cols">
@@ -494,7 +494,7 @@ const applyWithState = withState( {
494494
totalOptionsCount: 0,
495495
queryTerm: '',
496496
page: 1,
497-
isLoading: true
497+
isLoading: false
498498
} );
499499

500500
const applyWithEffects = withEffects( aperture, { handler } );

packages/core/fields/association/style.scss

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,45 @@
99
justify-content: space-between;
1010
align-items: center;
1111
flex-direction: row;
12+
border-color: $wp-color-gray-light-500;
13+
border-style: solid;
14+
border-width: 1px 1px 0;
15+
box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.07 );
1216

1317
.cf-search-input {
1418
flex: 1 1 auto;
1519
}
1620

1721
.cf-search-input__inner {
18-
border-bottom: 0;
22+
border: 0;
23+
box-shadow: none;
24+
25+
&:focus {
26+
border-color: none;
27+
box-shadow: none;
28+
outline: none;
29+
}
30+
}
31+
32+
&:focus-within {
33+
border-color: #5b9dd9;
34+
box-shadow: 0 0 2px rgba( 30, 140, 190, 0.8 );
35+
outline: 2px solid transparent;
1936
}
2037
}
2138

2239
.cf-association__counter {
2340
font-size: 12px;
2441
color: $wp-color-dark-gray;
2542
pointer-events: none;
26-
margin-right: 25px;
27-
margin-left: 10px;
43+
margin-right: 5px;
44+
margin-left: 5px;
2845
}
2946

3047
.cf-association__spinner {
3148
float: none;
32-
position: absolute;
33-
right: 0;
3449
margin: 0;
50+
margin-left: 5px;
3551
}
3652

3753
.cf-association__cols {

0 commit comments

Comments
 (0)