mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 17:22:45 -05:00
fix the legacy card style issue (#12428)
* fix the legacy card style issue * replace the card class
This commit is contained in:
@@ -15,12 +15,12 @@
|
||||
<div [class]="iconClass" [style.width]="iconWidth" [style.height]="iconHeight"></div>
|
||||
</div>
|
||||
<h4 class="card-label">{{label}}</h4>
|
||||
<div *ngIf="descriptions.length > 0" class="model-card-description-container">
|
||||
<div *ngIf="descriptions.length > 0" class="model-card-description-container-legacy">
|
||||
<div *ngFor="let desc of descriptions">
|
||||
<div *ngIf="desc.label; else separator" [style.font-weight]="desc.fontWeight"
|
||||
class="model-card-list-item-description">
|
||||
class="model-card-list-item-description-legacy">
|
||||
<span>{{desc.label}}</span><span
|
||||
class="model-card-list-item-description-value">{{desc.value}}</span>
|
||||
class="model-card-list-item-description-value-legacy">{{desc.value}}</span>
|
||||
</div>
|
||||
<ng-template #separator>
|
||||
<div style="height: 12px"></div>
|
||||
@@ -35,7 +35,7 @@
|
||||
<h4 class="card-label">{{label}}</h4>
|
||||
<p class="card-value">{{value}}</p>
|
||||
<span *ngIf="actions">
|
||||
<table class="model-table">
|
||||
<table class="model-table-legacy">
|
||||
<tr *ngFor="let action of actions">
|
||||
<td class="table-row">{{action.label}}</td>
|
||||
<td *ngIf="action.actionTitle" class="table-row">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import 'vs/css!./media/card';
|
||||
import 'vs/css!./media/legacycard';
|
||||
|
||||
import {
|
||||
Component, Input, Inject, ChangeDetectorRef, forwardRef, ElementRef, OnDestroy, ViewChild
|
||||
@@ -117,7 +117,7 @@ export default class CardComponent extends ComponentWithIconBase<azdata.CardProp
|
||||
}
|
||||
|
||||
public getClass(): string {
|
||||
let cardClass = this.isListItemCard ? 'model-card-list-item' : 'model-card';
|
||||
let cardClass = this.isListItemCard ? 'model-card-list-item-legacy' : 'model-card-legacy';
|
||||
return (this.selectable && this.selected || this._hasFocus) ? `${cardClass} selected` :
|
||||
`${cardClass} unselected`;
|
||||
}
|
||||
|
||||
200
src/sql/workbench/browser/modelComponents/media/legacycard.css
Normal file
200
src/sql/workbench/browser/modelComponents/media/legacycard.css
Normal file
@@ -0,0 +1,200 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.model-card-legacy {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: 90%;
|
||||
width: auto;
|
||||
margin: 15px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
border-color: rgb(214, 214, 214);
|
||||
}
|
||||
|
||||
.model-card-legacy .card-content {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
width: auto;
|
||||
padding: 10px 45px 20px 45px;
|
||||
min-height: 30px;
|
||||
min-width: 30px;
|
||||
}
|
||||
|
||||
.model-card-legacy .card-vertical-button {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
height: auto;
|
||||
width: auto;
|
||||
padding: 5px 5px 5px 5px;
|
||||
min-height: 130px;
|
||||
min-width: 130px;
|
||||
}
|
||||
|
||||
.model-card-legacy .card-label {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.model-card-legacy .card-value {
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.model-card-legacy .iconContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-grow: 1;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
padding: 10px 0px 10px 0px;
|
||||
border-color: rgb(214, 214, 214);
|
||||
}
|
||||
|
||||
.model-card-legacy .cardIcon {
|
||||
display: inline-block;
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 50px;
|
||||
max-height: 50px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.model-card-legacy .card-status {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
left: 5px;
|
||||
overflow: hidden;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.model-card-legacy .status-content {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
min-width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.model-card-list-item-legacy .selection-indicator-container, .model-card-legacy .selection-indicator-container {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
overflow: hidden;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 50%;
|
||||
background-color: white;
|
||||
border-width: 1px;
|
||||
border-color: rgb(0, 120, 215);
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.model-card-list-item-legacy .selection-indicator-container, .model-card-legacy .selection-indicator-container {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 50%;
|
||||
background-color: white;
|
||||
border-width: 1px;
|
||||
border-color: rgb(214, 214, 214);
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.model-card-list-item-legacy .selection-indicator-container {
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.model-card-legacy .selection-indicator-container {
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.model-card-list-item-legacy .selection-indicator, .model-card-legacy .selection-indicator {
|
||||
margin: 4px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background-color: rgb(0, 120, 215);
|
||||
}
|
||||
|
||||
.model-card-legacy .model-table-legacy {
|
||||
border-spacing: 5px;
|
||||
}
|
||||
|
||||
.model-table-legacy .table-row {
|
||||
width: auto;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.model-table-legacy .table-cell {
|
||||
vertical-align: top;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.model-table-legacy a {
|
||||
cursor: pointer;
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.model-card-list-item-legacy {
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 5px 0px 5px 0px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.model-card-list-item-legacy .list-item-content {
|
||||
height: auto;
|
||||
padding: 5px 26px 5px 5px;
|
||||
min-height: 30px;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.model-card-list-item-legacy .list-item-icon {
|
||||
background-position: 2px 2px;
|
||||
padding-left: 22px;
|
||||
font-size: 15px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 16px 16px;
|
||||
}
|
||||
|
||||
.model-card-list-item-legacy .list-item-description {
|
||||
padding-left: 22px;
|
||||
}
|
||||
|
||||
.model-card-description-container-legacy {
|
||||
border-top-width: 1px;
|
||||
border-top-style: solid;
|
||||
border-color: rgb(214, 214, 214);
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.model-card-list-item-description-legacy {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.model-card-list-item-description-value-legacy {
|
||||
float: right;
|
||||
}
|
||||
Reference in New Issue
Block a user