Git Product home page Git Product logo

Comments (3)

0xTim avatar 0xTim commented on June 19, 2024

The Leaf syntax was discussed on the forums a couple of years ago here - https://forums.swift.org/t/pitch-new-leaf-body-syntax/18188

We can revisit the syntax for the next major version, but it's not possible to change without a major breaking change.

As an aside, if you're concerned about your security attack surface you should be blocking inline CSS and JS with a CSP header and loading it from an external trusted source (or your own domain)

from leaf.

lmcd avatar lmcd commented on June 19, 2024

My use case necessitates the server have control over the CSS output, and we're talking a barebones stylesheet of just a few kb. Adding a whole new server/deployment workflow for one 2kb CSS file adds complexity I'm trying to avoid.

How a stylesheet gets served is beyond the point I was trying to make: Leaf, by design makes it difficult to create the kind of templates its presumably intended to serve - HTML ones.

This issue was designed to serve as a discussion point around changing the syntax in a future major version. I wasn't suggesting we put out a minor point update with a major breaking change. There was potentially also discussion to be had around avoiding false positives 🤷‍♂️

from leaf.

0xTim avatar 0xTim commented on June 19, 2024

Sorry, didn't mean to come across like nothing was up for discussion! Rushing through issues is always fun! 😅

My suggestion would be to open an issue on the Swift forums to discuss new syntax for Leaf, that's a better place to have those discussions. Additionally, once #128 is solved, that should make inline CSS much easier

from leaf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.