This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package svg
|
||||
|
||||
type (
|
||||
FontSize struct {
|
||||
*LengthAttr[FontSizeTag]
|
||||
}
|
||||
FontSizeP struct {
|
||||
PercentageAttr[FontSizeTag]
|
||||
}
|
||||
|
||||
FontSizeTag struct{}
|
||||
)
|
||||
|
||||
func (l *Length) AsFontSize() FontSize {
|
||||
return FontSize{LengthAttr: (*LengthAttr[FontSizeTag])(l)}
|
||||
}
|
||||
|
||||
func (p Percentage) AsFontSize() FontSizeP {
|
||||
return FontSizeP{PercentageAttr: (PercentageAttr[FontSizeTag])(p)}
|
||||
}
|
||||
|
||||
func (FontSizeTag) PrintTag() string {
|
||||
return "font-size"
|
||||
}
|
||||
Reference in New Issue
Block a user