8000 GitHub - atdiar/gosf: CSS to Go Styling Functions converter
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

atdiar/gosf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GoSF - CSS to Go Styling Functions Converter

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.

Features

  • 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.

Getting Started

  1. Visit the Website: Go to GoSF to start converting your CSS.
  2. Input CSS: Paste your CSS code into the input field.
  3. Generate Go Functions: Click the convert button to generate Go styling functions.
  4. Copy and Use: Copy the generated code and use it in your zui projects.

Example

CSS Input

.button {
    background-color: #4CAF50;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
}

Go Output

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
}

License

(GoSF is licensed under the MIT License unlike zui which is source available. See the LICENSE file for details.)

Contact

For any questions or feedback, please reach out to us at info@zui.dev.

Happy Coding!

About

CSS to Go Styling Functions converter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0