Skip to content

Commit 549f6f5

Browse files
JustinXinLiunmetulev
authored andcommitted
Updated tasks styling (#224)
* Updated tasks styling to be more aligned with Web Fluent/Fabric 7 * Fixes. * Updated new task styling. * Fixed alignment. * Use classmap. * Use task to check instead. * moved componentMediaQuery to baseComponent * Added alt design when there's no plan displayed. * Fixed desktop design when there's no plan. * Fixed tasks styling for ie11. * Fixed vertical alignment. * Restored index.html. * Updated button. * Fixed ie 11 resizing issue.
1 parent 3a59ec4 commit 549f6f5

File tree

6 files changed

+436
-201
lines changed

6 files changed

+436
-201
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"@microsoft/microsoft-graph-types-beta": "microsoftgraph/msgraph-typescript-typings#beta",
5353
"lit-element": "^2.2.1",
5454
"msal": "1.1.3",
55-
"office-ui-fabric-core": "10.1.0"
55+
"office-ui-fabric-core": "11.0.0"
5656
},
5757
"devDependencies": {
5858
"@babel/core": "^7.7.5",

src/components/baseComponent.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@
66
*/
77

88
import { LitElement, PropertyValues } from 'lit-element';
9+
10+
/**
11+
* Defines media query based on component width
12+
*
13+
* @export
14+
* @enum {string}
15+
*/
16+
export enum ComponentMediaQuery {
17+
/**
18+
* devices with width < 768
19+
*/
20+
mobile = '',
21+
22+
/**
23+
* devies with width < 1200
24+
*/
25+
tablet = 'tablet',
26+
27+
/**
28+
* devices with width > 1200
29+
*/
30+
desktop = 'desktop'
31+
}
32+
933
/**
1034
* BaseComponent extends LitElement including ShadowRoot toggle and fireCustomEvent features
1135
*
@@ -35,6 +59,23 @@ export abstract class MgtBaseComponent extends LitElement {
3559
this._useShadowRoot = value;
3660
}
3761

62+
/**
63+
* Gets the ComponentMediaQuery of the component
64+
*
65+
* @readonly
66+
* @type {ComponentMediaQuery}
67+
* @memberof MgtBaseComponent
68+
*/
69+
public get mediaQuery(): ComponentMediaQuery {
70+
if (this.offsetWidth < 768) {
71+
return ComponentMediaQuery.mobile;
72+
} else if (this.offsetWidth < 1200) {
73+
return ComponentMediaQuery.tablet;
74+
} else {
75+
return ComponentMediaQuery.desktop;
76+
}
77+
}
78+
3879
private static _useShadowRoot: boolean = true;
3980

4081
constructor() {
@@ -71,6 +112,7 @@ export abstract class MgtBaseComponent extends LitElement {
71112
});
72113
return this.dispatchEvent(event);
73114
}
115+
74116
/**
75117
* method to create ShadowRoot if disabled flag isn't present
76118
*

src/components/mgt-person-card/mgt-person-card.scss

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,17 @@ $color: var(--color, #{$ms-color-neutralDark});
3131

3232
.display-name {
3333
font-size: 27.3103px;
34-
// line-height: 36px;
3534
color: #333333;
3635
}
3736

3837
.job-title {
3938
font-size: 18.2069px;
40-
// line-height: 31px;
4139
color: #767676;
4240
font-weight: 600;
4341
}
4442

4543
.department {
4644
font-size: 15.1724px;
47-
// line-height: 31px;
4845
color: #767676;
4946
}
5047

@@ -68,14 +65,13 @@ $color: var(--color, #{$ms-color-neutralDark});
6865

6966
.additional-details-container {
7067
.additional-details-button {
68+
display: flex;
69+
justify-content: center;
70+
align-items: center;
7171
height: 28px;
7272
background: rgba(196, 196, 196, 0.1);
73-
text-align: center;
74-
position: relative;
7573
.additional-details-svg {
76-
width: 50%;
77-
bottom: 0;
78-
top: 100%;
74+
margin-bottom: 3px;
7975
}
8076
}
8177
.additional-details-button:hover {

0 commit comments

Comments
 (0)