@@ -68,8 +68,12 @@ fn get_definition(def: Definition) -> Box<dyn svg::node::Node> {
6868#[ cfg_attr( test, derive( EnumIter ) ) ]
6969pub ( super ) enum CSSClass {
7070 Path ,
71+
7172 FillNone ,
73+ StrokeWidth2 ,
74+
7275 OutlineStroke ,
76+
7377 RoomUnreachable ,
7478 RoomUnknown ,
7579 RoomColor0 ,
@@ -78,6 +82,7 @@ pub(super) enum CSSClass {
7882 RoomColor3 ,
7983 RoomColor4 ,
8084 RoomColor5 ,
85+
8186 WallBase ,
8287 VirtualWall ,
8388 NoMoppingWall ,
@@ -150,35 +155,66 @@ fn get_styles() -> &'static HashMap<CSSClass, CSSEntry> {
150155 static STYLES : OnceLock < HashMap < CSSClass , CSSEntry > > = OnceLock :: new ( ) ;
151156 STYLES . get_or_init ( || {
152157 HashMap :: from ( [
153- ( CSSClass :: Path , CSSEntry {
154- identifier : "path" ,
155- value : "stroke-width: 1.5; vector-effect: non-scaling-stroke" ,
156- class_name : "path" ,
157- required_def : None ,
158- } ) ,
158+ (
159+ CSSClass :: Path ,
160+ CSSEntry {
161+ identifier : "path" ,
162+ value : "stroke-width: 1.5; vector-effect: non-scaling-stroke" ,
163+ class_name : "path" ,
164+ required_def : None ,
165+ } ,
166+ ) ,
159167 ( CSSClass :: FillNone , css_entry ! ( "f" , "fill: none" ) ) ,
160- ( CSSClass :: OutlineStroke , CSSEntry {
161- class_name : "o" ,
162- value : "stroke: #666666; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3" ,
163- required_def : None ,
164- identifier : ".o path" ,
165- } ) ,
166- ( CSSClass :: RoomUnknown , css_entry ! ( "u" , "fill: #edf3fb" ) ) ,
167- ( CSSClass :: RoomUnreachable , css_entry ! ( "ru" , "fill: url(#ds); mix-blend-mode: multiply;" , Definition :: DiagonalStripes ) ) ,
168+ (
169+ CSSClass :: StrokeWidth2 ,
170+ CSSEntry {
171+ class_name : "s2" ,
172+ value : "stroke-width: 2" ,
173+ required_def : None ,
174+ identifier : ".s2 path" ,
175+ } ,
176+ ) ,
177+ (
178+ CSSClass :: OutlineStroke ,
179+ CSSEntry {
180+ class_name : "o" ,
181+ value : "stroke: #666666; stroke-linecap: round; stroke-linejoin: round" ,
182+ required_def : None ,
183+ identifier : ".o path" ,
184+ } ,
185+ ) ,
186+ ( CSSClass :: RoomUnknown , css_entry ! ( "u" , "fill: #edf3fb" ) ) ,
187+ (
188+ CSSClass :: RoomUnreachable ,
189+ css_entry ! (
190+ "ru" ,
191+ "fill: url(#ds); mix-blend-mode: multiply;" ,
192+ Definition :: DiagonalStripes
193+ ) ,
194+ ) ,
168195 room_color_entry ! ( RoomColor0 , "#a2bce7" ) ,
169196 room_color_entry ! ( RoomColor1 , "#ecd099" ) ,
170197 room_color_entry ! ( RoomColor2 , "#9bd4da" ) ,
171198 room_color_entry ! ( RoomColor3 , "#ecc6c9" ) ,
172199 room_color_entry ! ( RoomColor4 , "#d7bce3" ) ,
173200 room_color_entry ! ( RoomColor5 , "#c3e2b6" ) ,
174- ( CSSClass :: WallBase , CSSEntry {
175- class_name : "w" ,
176- value : "stroke-dasharray: 4; stroke-width: 3" ,
177- required_def : None ,
178- identifier : ".w path" ,
179- } ) ,
180- ( CSSClass :: VirtualWall , css_entry ! ( "v" , "stroke: #f00000; fill: #f0000030" ) ) ,
181- ( CSSClass :: NoMoppingWall , css_entry ! ( "m" , "stroke: #ffa500; fill: #ffa50030" ) ) ,
201+ (
202+ CSSClass :: WallBase ,
203+ CSSEntry {
204+ class_name : "w" ,
205+ value : "stroke-dasharray: 4" ,
206+ required_def : None ,
207+ identifier : ".w path" ,
208+ } ,
209+ ) ,
210+ (
211+ CSSClass :: VirtualWall ,
212+ css_entry ! ( "v" , "stroke: #f00000; fill: #f0000030" ) ,
213+ ) ,
214+ (
215+ CSSClass :: NoMoppingWall ,
216+ css_entry ! ( "m" , "stroke: #ffa500; fill: #ffa50030" ) ,
217+ ) ,
182218 ] )
183219 } )
184220}
0 commit comments