File tree Expand file tree Collapse file tree 9 files changed +20
-18
lines changed
Expand file tree Collapse file tree 9 files changed +20
-18
lines changed Original file line number Diff line number Diff line change @@ -260,25 +260,30 @@ Styling elements can be achieved by creating an [element style](/dsl/cookbook/el
260260
261261 styles {
262262 element "Element" {
263- color white
263+ color #0773af
264+ stroke #0773af
265+ strokeWidth 7
266+ shape roundedbox
264267 }
265268 element "Person" {
266- background #116611
267269 shape person
268270 }
269- element "Software System" {
270- background #2D882D
271+ element "Boundary" {
272+ strokeWidth 5
273+ }
274+ relationship "Relationship" {
275+ thickness 4
271276 }
272277 }
273278 }
274279```
275280
276281This code:
277282
278- - sets the foreground colour of all elements to white
279- - sets the background colour of all software systems to green
280- - sets the background colour of all people to a darker green
283+ - sets the foreground colour and stroke of all elements to #0773af (blue)
281284- sets the shape of all people to a person shape
285+ - increases the line thickness for boundary boxes (e.g. the dashed line that shows the software system boundary on a container diagram)
286+ - increases the line thickness for relationships
282287
283288[ ![ ] ( /dsl/tutorial/5-1.png )] ( http://structurizr.com/dsl?src=https://docs.structurizr.com/dsl/tutorial/5.dsl&view=Diagram1 )
284289
@@ -299,17 +304,12 @@ And then we can define an element style for that `Database` tag.
299304```
300305 styles {
301306 ...
302- element "Container" {
303- background #55aa55
304- }
305307 element "Database" {
306308 shape cylinder
307309 }
308310 }
309311```
310312
311- We have additionally added an element style for the ` Container ` tag, to set the colour of all containers to a lighter green.
312-
313313[ ![ ] ( /dsl/tutorial/5-2.png )] ( http://structurizr.com/dsl?src=https://docs.structurizr.com/dsl/tutorial/5.dsl&view=Diagram2 )
314314
315315Clicking the "i" button inside the diagram editor will reveal the automatically generated diagram key for that particular diagram.
Original file line number Diff line number Diff line change @@ -28,17 +28,19 @@ workspace "Name" "Description"
2828
2929 styles {
3030 element "Element" {
31- color white
31+ color #0773af
32+ stroke #0773af
33+ strokeWidth 7
34+ shape roundedbox
3235 }
3336 element "Person" {
34- background #116611
3537 shape person
3638 }
37- element "Software System " {
38- background #2D882D
39+ element "Boundary " {
40+ strokeWidth 5
3941 }
40- element "Container " {
41- background #55aa55
42+ relationship "Relationship " {
43+ thickness 4
4244 }
4345 element "Database" {
4446 shape cylinder
You can’t perform that action at this time.
0 commit comments