Welcome to GoSF, a helper website designed to convert your CSS into Go styling functions for zui in web mode. zui is a Go library for building user interfaces, and you can learn more about it at zui.dev.
- CSS to Go Conversion: Easily convert your CSS styles into Go functions compatible with zui/web.
- User-Friendly Interface: Simple and intuitive interface to streamline your workflow.
- Instant Preview: See the results of your conversions in real-time.
- Visit the Website: Go to GoSF to start converting your CSS.
- Input CSS: Paste your CSS code into the input field.
- Generate Go Functions: Click the convert button to generate Go styling functions.
- Copy and Use: Copy the generated code and use it in your zui projects.
.button {
background-color: #4CAF50;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
}
func ButtonStyle(e *ui.Element) *ui.Element {
e = doc.CSS.Container.Style.BackgroundColor.Value("#4CAF50")(e)
e = doc.CSS.Container.Style.Color.White(e)
e = doc.CSS.Container.Layout.Padding.Value("15px 32px")(e)
e = doc.CSS.Container.Style.TextAlign.Center(e)
e = doc.CSS.Container.Style.TextDecoration.Value("none")(e)
e = doc.CSS.Container.Layout.Display.Value("inline-block")(e)
e = doc.CSS.Container.Style.FontSize.Value("16px")(e)
return e
}
(GoSF is licensed under the MIT License unlike zui which is source available. See the LICENSE file for details.)
For any questions or feedback, please reach out to us at info@zui.dev.
Happy Coding!