This repository was archived by the owner on Aug 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +20
-73
lines changed
assets/stylesheets/sage/system
views/sage/examples/objects/live_avatar Expand file tree Collapse file tree 5 files changed +20
-73
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ $-live-avatar-ring-colors: (
35
35
);
36
36
$-live-avatar-tile-size : rem (216px );
37
37
38
+ @mixin live-avatar-scaling () {
39
+ width : 100% ;
40
+ height : 100% ;
41
+ }
42
+
38
43
.sage-live-avatar {
39
44
display : grid ;
40
45
grid-template-columns : 100% ;
@@ -79,14 +84,11 @@ $-live-avatar-tile-size: rem(216px);
79
84
@include sage-feature-live-avatar-ring ();
80
85
}
81
86
82
- .sage-live-avatar--scaling {
83
- width : 100% ;
84
- height : 100% ;
85
- }
86
-
87
87
.sage-live-avatar--tile {
88
88
padding : sage-spacing (md );
89
89
border-radius : initial ;
90
+
91
+ @include live-avatar-scaling ;
90
92
}
91
93
92
94
// Set up color variations
Original file line number Diff line number Diff line change @@ -266,6 +266,7 @@ button::-moz-focus-inner,
266
266
input [type = " radio" ],
267
267
input [type = " checkbox" ] {
268
268
box-sizing : border-box ;
269
+ margin : 0 ;
269
270
padding : 0 ;
270
271
}
271
272
Original file line number Diff line number Diff line change 1
- < div class ="sage-live-avatar <%= color != "" ? "sage-live-avatar--#{ color } " : "" %> <%= hasRing ? "sage-live-avatar--ring" : "" %> <%= scale ? "sage-live-avatar--scaling" : "" %> <%= custom_class %> ">
1
+ < div class ="sage-live-avatar <%= color != "" ? " sage-live-avatar--#{ color } " : "" %> <%= hasRing ? " sage-live-avatar--ring" : "" %> <%= scale ? " sage-live-avatar--scaling" : "" %> <%= custom_class %> ">
2
2
< svg class ="sage-live-avatar__initials " viewBox ="0 0 40 40 ">
3
3
< text text-anchor ="middle " x ="19.5 " y ="24 "> <%= initials %> </ text >
4
4
</ svg >
Original file line number Diff line number Diff line change 58
58
scale : false ,
59
59
custom_class : ""
60
60
%>
61
- </ div >
62
-
63
- < div class ="sage-live-avatar-wrapper ">
64
- < div style ="width: 40px; height: 40px; ">
65
- <%= render "sage/examples/objects/live_avatar/markup" ,
66
- initials : "JC" ,
67
- color : "purple" ,
68
- hasRing : false ,
69
- url : "" ,
70
- scale : true ,
71
- custom_class : ""
72
- %>
73
- </ div >
74
- < div style ="width: 128px; height: 128px; ">
75
- <%= render "sage/examples/objects/live_avatar/markup" ,
76
- initials : "JC" ,
77
- color : "purple" ,
78
- hasRing : false ,
79
- url : "" ,
80
- scale : true ,
81
- custom_class : ""
82
- %>
83
- </ div >
84
- < div style ="width: 256px; height: 256px; ">
85
- <%= render "sage/examples/objects/live_avatar/markup" ,
86
- initials : "JC" ,
87
- color : "purple" ,
88
- hasRing : false ,
89
- url : "" ,
90
- scale : true ,
91
- custom_class : ""
92
- %>
93
- </ div >
94
- </ div >
95
-
96
- < div class ="sage-live-avatar-wrapper ">
97
- < div style ="width: 40px; height: 40px; ">
98
- <%= render "sage/examples/objects/live_avatar/markup" ,
99
- initials : "LJ" ,
100
- color : "" ,
101
- hasRing : false ,
102
- url : "../../assets/sage/avatar/jay.png" ,
103
- scale : true ,
104
- custom_class : ""
105
- %>
106
- </ div >
107
- < div style ="width: 128px; height: 128px; ">
108
- <%= render "sage/examples/objects/live_avatar/markup" ,
109
- initials : "LJ" ,
110
- color : "" ,
111
- hasRing : false ,
112
- url : "../../assets/sage/avatar/jay.png" ,
113
- scale : true ,
114
- custom_class : ""
115
- %>
116
- </ div >
117
- < div style ="width: 256px; height: 256px; ">
118
- <%= render "sage/examples/objects/live_avatar/markup" ,
119
- initials : "LJ" ,
120
- color : "" ,
121
- hasRing : false ,
122
- url : "../../assets/sage/avatar/jay.png" ,
123
- scale : true ,
124
- custom_class : ""
125
- %>
126
- </ div >
127
- </ div >
61
+ </ div >
Original file line number Diff line number Diff line change 19
19
< td > Boolean</ td >
20
20
< td > false</ td >
21
21
</ tr >
22
+ < tr >
23
+ < td > tile</ td >
24
+ < td >
25
+ With the < code > --tile</ code > modifier this component can become scalable as the core part of
26
+ a tile. In such cases, the initials or avatar image will be centered on a background depending
27
+ on the color passed in. The tile container should provide the sizing constraints.
28
+ </ td >
29
+ < td > Boolean</ td >
30
+ < td > false</ td >
31
+ </ tr >
You can’t perform that action at this time.
0 commit comments