Skip to content

Commit

Permalink
Merge pull request #1210 from rhamilto/resource-icon-normalization
Browse files Browse the repository at this point in the history
Normalize display of <ResourceIcon> across browsers, platforms
  • Loading branch information
openshift-merge-robot authored Feb 26, 2019
2 parents 93e7c4c + 7c1cedc commit def6a27
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 34 deletions.
38 changes: 10 additions & 28 deletions frontend/public/components/_resource.scss
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
$height: 18px;

.co-m-resource-icon {
background-color: $color-container-dark;
border-radius: 10px;
border-radius: 20px;
color: #fff;
display: inline-block;
font-size: $font-size-base - 1;
font-weight: normal;
height: $height;
line-height: $height;
font-weight: 300;
line-height: 16px;
margin-right: 4px;
min-width: $height;
padding: 0 4px;
min-width: 18px;
padding: 2px 4px 1px;
text-align: center;

&--lg {
border-radius: 12px;
font-size: 16px;
height: 24px;
line-height: 24px;
margin-left: 0;
font-size: ($font-size-base + 1);
line-height: 21px;
margin-right: 7px;
min-width: 24px;
padding: 0 7px;
position: relative;
top: 2px;
padding-left: 7px;
padding-right: 7px;
}
}

Expand Down Expand Up @@ -106,18 +100,6 @@ $height: 18px;
background-color: $color-ingress-dark;
}

.co-m-resource-icon--all {
background-color: black;
}

.co-m-resource-icon--align-left {
margin-left: 0;
}

.co-m-resource-icon--flex-child {
margin-right: 7px;
}

.co-resource-link {
align-items: baseline;
display: flex;
Expand Down
3 changes: 0 additions & 3 deletions frontend/public/components/_sysevent-stream.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ $color-dark-border: #ddd;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
.co-m-resource-icon {
margin-left: 0;
}
}

.co-sysevent--transition {
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/components/ingress.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const getTLSCert = (ingress) => {
const certs = _.map(ingress.spec.tls, 'secretName');

return <div>
<ResourceIcon kind="Secret" className="co-m-resource-icon--align-left" />
<ResourceIcon kind="Secret" />
<span>{certs.join(', ')}</span>
</div>;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class ConfigureNamespacePullSecret extends PromiseComponent {
<label>Namespace</label>
</div>
<div className="col-xs-9">
<ResourceIcon kind="Namespace" className="co-m-resource-icon--align-left" /> &nbsp;{namespace.metadata.name}
<ResourceIcon kind="Namespace" /> &nbsp;{namespace.metadata.name}
</div>
</div>

Expand All @@ -193,7 +193,7 @@ class ConfigureNamespacePullSecret extends PromiseComponent {
</div>
{ pullSecret ?
<div className="col-xs-9">
<ResourceIcon kind="Secret" className="co-m-resource-icon--align-left" />
<ResourceIcon kind="Secret" />
&nbsp;{_.get(pullSecret, 'metadata.name')}
</div> : <div className="col-xs-9">
<input type="text" className="form-control" id="namespace-pull-secret-name" aria-describedby="namespace-pull-secret-name-help" required />
Expand Down

0 comments on commit def6a27

Please sign in to comment.