Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
An utility library that intends to applies any popular UI framework to standard html markup
There is a large number of UI frameworks that can be used for web app development. Without too much effort, You can add UI elements by just incorporate the the markup language provided by any of those frameworks. The markup is however framework specific, and causes a vendor lock-in.
The example below shows the differences between the usage of a large colorful button in bootstrap and Bulma.
<button class="btn btn-primary btn-lg">botstrap button</button>
<button class="button is-primary is-large">bulma button</button>
In order to be able to move from one UI framework to another, we introduce a clean and standard markup for the html (we're not religious about this markup, but we aim to be as close to html5 standard as we can).
<button class="large">agnos button</button>
In our scss file, we're using the agnos to transform the underlying UI framework to our UI.
There are couple of other related concerns that are related to this work:
Agnus has not yet been published to npm. In order to experiment with this framework, you can clone the project and use it by adding the following lines to your application scss file:
@import '../../agnos/scss/bulma';
@include _bootstrap($button: true, $tabs: true);
(this example will extend bulma, but only the button and tabs).
This library just got started, so only a few components have been transformed. The implementation is intended to be extendable, but in order to 'proof' the concept, the following UI frameworks are used:
Feature | Bootstrap | Materialize | Bulma | Foundation | Fundamental UI |
---|---|---|---|---|---|
Typography | ✅ | ✅ | ✅ | ✅ | ✅ |
Button | ✅ | ✅ | ✅ | ✅ | ✅ |
Tabs | ✅ | ✅ ¹ | ✅ | ✅ | ✅ |
Alert | ✅ | N/A | ✅ | ✅ | ✅ |
¹ Feature is incomplete as it requires JS
This project only tries to fix the CSS part of the UI. Any interaction that requires JS are out of scope (which btw causes another dependency lock-in).
The key technique that used in agnos relies on inheritance, a key concept form the sass language. Using sass @extend
obviously requires the UI framework to support sass in the first place (but most of them seem to do that). Ideally, UI frameworks would offer placeholder selectors to extend from,instead of concrete selectors. This would decrease the CSS output. Without placeholder selectors, the output is more poluted then anyone would like.
FAQs
An utility library that intends to applies any popular UI framework to standard html markup
The npm package agnos receives a total of 2 weekly downloads. As such, agnos popularity was classified as not popular.
We found that agnos demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.