https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
fritz2
  • n

    Nikky

    10/20/2020, 6:05 PM
    so.. i stumbled over those old proof of concept from someone doing websockets in remotes/stores and this seems to be the only code that seems to be broken when updating it to latest.. and i am not sure what to replace the calls with https://github.com/Luftzig/fritz2-stores/blob/1dfad499d2c2b109bd211e8266337b7f811542af/src/jsMain/kotlin/dev/fritz2/binding/rest.kt#L19-L25 specifically
    Store::apply
    does not seem to exist anymore and
    andThen
    i guess
    b
    j
    6 replies · 3 participants
  • n

    napperley

    11/01/2020, 11:47 PM
    What does the Fritz2 Gradle plugin do, and why is it needed?
    b
    n
    +1
    9 replies · 4 participants
  • n

    napperley

    11/03/2020, 2:06 AM
    How do I update a HTML element that isn't managed by Fritz2? For example I want to update the text in the title element.
    b
    10 replies · 2 participants
  • n

    napperley

    11/04/2020, 2:08 AM
    Event handling in Fritz2 is too complicated/inflexible. I want to do stateless event handling but Fritz2 doesn't allow this since all event handlers have to be tightly coupled to a Store, and data binding is mandatory.
    j
    2 replies · 2 participants
  • p

    pabl0rg

    11/20/2020, 3:19 PM
    Anyone know if fritz2 supports SSR (server-side rendering)? (preferably on jvm, not node)
    🇳🇴 2
    b
    3 replies · 2 participants
  • b

    Big Chungus

    12/04/2020, 4:23 PM
    Congratz on 0.8 release! Just finished reading through components preview docs and I have to say - I'm impressed. Outstanding job. Will be building out ui for kamp in the upcoming weeks with them. Exciting!
    j
    1 reply · 2 participants
  • c

    christophsturm

    12/04/2020, 4:28 PM
    where are releases announced?
    b
    j
    4 replies · 3 participants
  • n

    Nikky

    12/14/2020, 1:08 PM
    can you do lenses for data classes from 3rd part sources ? since i cannot put a annotation on them or do i need to copy them into a new class that then has lenses ?
    b
    j
    5 replies · 3 participants
  • j

    Jilles van Gurp

    12/15/2020, 9:44 AM
    I'm trying to integrate our mpp client library into a fritz2 project. We have a login function that suspends that we are trying to call from a handler on the login form. When it runs, we get this error.
    {…}
    
    "cause_us9j0c$_0": TypeError: NetworkError when attempting to fetch resource.
    
    "message_q7r8iu$_0": "Fail to fetch"
    
    name: "Error"
    
    stack: "captureStack@webpack-internal:///./kotlin-dce-dev/kotlin.js:39116:27\nError_0@webpack-internal:///./kotlin-dce-dev/kotlin.js:39410:14\ncommonFetch$lambda$lambda_1/<@webpack-internal:///./kotlin-dce-dev/ktor-ktor-client-core-jsLegacy.js:17565:68\npromise callback*commonFetch$lambda/<@webpack-internal:///./kotlin-dce-dev/ktor-ktor-client-core-jsLegacy.js:17581:11\nsuspendCancellableCoroutine$lambda_1/<@webpack-internal:///./kotlin-dce-dev/ktor-ktor-client-core-jsLegacy.js:17547:16\nCoroutine$commonFetch.prototype.doResume@webpack-internal:///./kotlin-dce-dev/ktor-ktor-client-core-jsLegacy.js:17602:116\ncommonFetch@webpack-internal:///./kotlin-dce-dev/ktor-ktor-client-core-jsLegacy.js:17630:23\nCoroutine$execute_dkgphz$.prototype.doResume@webpack-internal:///./kotlin-dce-dev/ktor-ktor-client-core-jsLegacy.js:16974:25\nJsClientEngine.prototype.execute_dkgphz$@webpack-internal:///./kotlin-dce-dev/ktor-ktor-client-core-jsLegacy.js:17004:21\nCoroutine$HttpClientEngine$executeWithinCallContext$lambda.prototype.doResume@webpack-internal:///./kotlin-dce-dev/ktor-ktor-client-core-jsLegacy.js:1591:58\nCoroutineImpl.prototype.resumeWith_tl1gpc$@webpack-internal:///./kotlin-dce-dev/kotlin.js:39279:35\nDispatchedTask.prototype.run@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:34823:22\nMessageQueue.prototype.process@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:38215:15\nWindowMessageQueue$schedule$lambda/<@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:38170:27\npromise callback*WindowMessageQueue.prototype.schedule@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:38175:25\nMessageQueue.prototype.enqueue_771g0p$@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:38202:10\nWindowDispatcher.prototype.dispatch_5bn72i$@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:38126:16\nJsMainDispatcher.prototype.dispatch_5bn72i$@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:37913:17\ndispatch@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:34864:20\nCancellableContinuationImpl.prototype.dispatchResume_0@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:1549:11\nCancellableContinuationImpl.prototype.completeResume_za3rmp$@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:1647:8\nAbstractChannel$ReceiveElement.prototype.completeResumeReceive_11rb$@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:6207:13\nArrayChannel.prototype.offerInternal_11rb$@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:6938:28\nAbstractSendChannel.prototype.offer_11rb$@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:5316:21\nChannelCoroutine.prototype.offer_11rb$@webpack-internal:///./kotlin-dce-dev/kotlinx-coroutines-core.js:7768:26\nWithEvents$subscribe$lambda$lambda/<@webpack-internal:///./kotlin-dce-dev/fritz2-core.js:3398:13\n"
    
    <prototype>: Object { constructor: Error_0(), stack: "", … }
    kotlinx-coroutines-core.js:37890
    h
    j
    8 replies · 3 participants
  • h

    Harald Pehl

    12/17/2020, 8:50 AM
    I'm pleased to announce the first public release of PatternFly Fritz2. PatternFly Fritz2 is a Kotlin/JS implementation of PatternFly based on fritz2. The goal of PatternFly Fritz2 is to provide all PatternFly components in Kotlin/JS. This is done in a way that matches the reactive nature of fritz2. To get a quick overview take a look at the PatternFly Fritz2 showcase. It demonstrates the usage of all available components and and also includes more complex demos of data driven components such as card view, data list and data table. PatternFly Fritz2 is still under development. The API might change and things might not work as expected. Please give it a try and share your feedback.
    :mind-blown: 1
    👍 4
    b
    6 replies · 2 participants
  • j

    Jilles van Gurp

    12/17/2020, 4:32 PM
    I have a question regarding the RootStore. I noticed that after an update, current still reflects the old value because it updates asynchronously. So you can't read your own writes consistently currently.
    update("xx")
    println(current) // prints old value
    
    update("yy")
    delay(1000)
    println(current) // prints yy
    I solved it in my store by also putting the value in a private variable but that feels a bit ugly. Would it be possible to make this more consistent/less flaky?
    j
    1 reply · 2 participants
  • h

    Hampus Londögård

    12/19/2020, 12:30 PM
    Hi, has anyone looked at the output size of a fritz2 webapp, compared to let's say React or Svelte (using JS, not Kotlin.JS). Interested about how large the app becomes. 🙂
    c
    j
    +1
    4 replies · 4 participants
  • b

    Big Chungus

    12/30/2020, 8:30 AM
    Can't find it in the docs so I'll ask here - does fritz2 components lib provide dark theme?
    j
    1 reply · 2 participants
  • j

    Jilles van Gurp

    01/19/2021, 1:39 PM
    Hey, we have an issue with leaflet where we need to invoke a function after the div is rendered after routing so leaflet can attach itself to the div. The problem is that there seems to be no obvious place to put this code. We have a clicks handler but that invokes the code before the div is rendered. The second time we click it, that actually works. What we would need is some kind of afterRender callback where we can put this logic.
    n
    4 replies · 2 participants
  • n

    Nikky

    01/20/2021, 6:35 PM
    is there a sample for how to make a switch work? i seem to be unable to figure out how to set its state when clicked which function do i call to make sure that it takes its display state from a subStore / lense thing ? figured it out.. there was a exampple for checkBox that does this
    switch {
        checked { switchState.data }
        changes handledBy switchHandlerStore.flip
    }
    j
    1 reply · 2 participants
  • n

    Nikky

    01/27/2021, 4:50 PM
    is there any fritz2 example code for how to use a file picker? we need access to the File blocb which seems to only come from events on
    <input type="file">
    or so.. but i am not sure how to attach event listeners in fritz2.. and i feel like i am going down the wrong path
    👀 1
    h
    j
    12 replies · 3 participants
  • b

    Big Chungus

    02/04/2021, 4:39 PM
    Sorry to by pushy, but is there any ETA for IR support? I've seen some commits being pushed for that, so curious when the next version is planned to surface?
    j
    2 replies · 2 participants
  • n

    Nikky

    02/16/2021, 12:22 PM
    we have a Substore containing
    List<String>
    and a
    .renderEach
    seems to not work on it.. did we overlook anything ? our goal is to have a varaible amount of text fields that we can add or remove with a +/- button in a form seems like .renderEach only gets called initally for the last value in the list and does not emit any html i am wondering if we imported the wrong function it kinda works if we do
    roles.data.renderEach
    but now we have to make the update calls go though the store that contains the list of them and need to figure out which one we were editing, probably each if we just make a data class for it that contains the value and a unique id, but that seems like .. unnecessary complexity
    j
    1 reply · 2 participants
  • b

    Big Chungus

    02/19/2021, 10:37 PM
    Been thinking that it'd be nice to have fritz2 public api available in common sourceSet. This would future proof the framework for potential expansion into kotlin wasm once that's stable
    j
    n
    5 replies · 3 participants
  • h

    Hampus Londögård

    02/22/2021, 9:33 AM
    Is there any place where people save “fritz2 webcomponents” or such? Would be cool! I’m gonna create a simple image-slider myself and thought I might as well open-source it for people to use.
    b
    j
    8 replies · 3 participants
  • b

    Big Chungus

    02/23/2021, 8:55 AM
    I feel that current styling api is way too verbose and makes code look very ugly. I'd strongly recommend reconsidering it now while you still can, with readability in mind. Thoughts?
    h
    1 reply · 2 participants
  • j

    Jilles van Gurp

    02/23/2021, 3:34 PM
    Hey just hit a few timeouts with jcenter. The fritz2 artifacts seem to still depend on that and also the fritz2 plugin defines that as the defailt. Have you thought about where to host that next?
    b
    h
    +1
    8 replies · 4 participants
  • n

    Nikky

    03/02/2021, 4:08 PM
    https://docs.fritz2.dev/StylingDSL.html this seems to be not allowed in kotlin syntax? 2 trailing lambda blocks seems to not be allowed
    b
    j
    5 replies · 3 participants
  • j

    Jan Weidenhaupt

    03/02/2021, 7:57 PM
    🎉 We are happy to announce a new version of fritz2! 🎉 The version 0.9 includes • improved API • improved performance & memory consumption • support Kotlin 1.4.30 & IR compiler • improved components (alpha) Here is the full release-note on github
    ❤️ 8
    :kotlin-intensifies: 4
    j
    2 replies · 2 participants
  • b

    Big Chungus

    03/08/2021, 4:06 PM
    Been working with fritz2 whole weekend, and I gotta say, my main pressure point was state handling with stores. I'm sure it's just me not understanding the concept in full, so could you please extend that part of the docs going into a bit more advanced topics such as "thunks", asyncronous composite actions, merging store flows into composite flow, rendering an element that depends on multiple stores, etc...
    j
    o
    3 replies · 3 participants
  • j

    Jacob Otto

    03/18/2021, 2:12 PM
    I am using bootstrap styling in some parts of my app (v5.0.0-beta1) and just upgraded fritz2 to v0.9.1. Now I get this error related to the fritz2 styling. Does not break anything, but you might have a look at it.
    style.kt?2304:31 unable to insert rule in stylesheet: Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to parse the rule ':-moz-ui-invalid{box-shadow:none;}'. DOMException: Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to parse the rule ':-moz-ui-invalid{box-shadow:none;}'.
        at eval (webpack-internal:///./kotlin-dce-dev/fritz2-styling-jsLegacy.js:3697:33)
        at Array.eval (webpack-internal:///./kotlin-dce-dev/fritz2-styling-jsLegacy.js:3707:68)
        at eval (webpack-internal:///../../node_modules/stylis/dist/stylis.mjs:68:5957)
        at se (webpack-internal:///../../node_modules/stylis/dist/stylis.mjs:68:5651)
        at Styling.addDynamicCss_puj7f4$ (webpack-internal:///./kotlin-dce-dev/fritz2-styling-jsLegacy.js:3763:7)
        at Styling.resetCss_61zpoe$ (webpack-internal:///./kotlin-dce-dev/fritz2-styling-jsLegacy.js:3756:10)
        at resetCss (webpack-internal:///./kotlin-dce-dev/fritz2-styling-jsLegacy.js:3790:27)
        at new Theme$Companion (webpack-internal:///./kotlin-dce-dev/fritz2-styling-jsLegacy.js:11092:5)
        at Theme$Companion_getInstance (webpack-internal:///./kotlin-dce-dev/fritz2-styling-jsLegacy.js:11109:7)
        at SpacesContext.left_bcpvvc$ (webpack-internal:///./kotlin-dce-dev/fritz2-styling-jsLegacy.js:2926:16)
    eval @ style.kt?2304:31
    j
    1 reply · 2 participants
  • b

    Big Chungus

    03/19/2021, 1:03 PM
    Hey, this might come handy to you as well. I've written a small utility function that helps in keeping styled component DSL consistent with fritz2 components lib DSL (also I find this a lot more readable):
    typealias StyledComponent<E> = RenderContext.(style: BoxParams.() -> Unit, block: E.() -> Unit) -> E
    fun <E> styled(component: BasicComponent<E>): StyledComponent<E> = { style, block ->
      (component.styled(styling = style))(block)
    }
    
    //usage
    fun RenderContext.preview() {
      styled(::div)({
       // div style
      }) {
       // div code and inner layout
        div {
          // child unstyled div
        } 
      }
    }
    j
    1 reply · 2 participants
  • j

    Jan Weidenhaupt

    03/19/2021, 1:46 PM
    🎉 We release a new version of our fritz2 KitchenSink demo! 🎉 It is based on our latest minor release 0.9.1 https://components.fritz2.dev/#Welcome It is currently on alpha status and more will come 😊 The source code of the site is provided on github
    :kotlin-intensifies: 1
    b
    9 replies · 2 participants
  • n

    napperley

    03/21/2021, 10:25 PM
    Both releases of Fritz2 (0.9 and 0.9.1) are broken. None of the libraries can be imported on the Kotlin JS side. This issue doesn't occur when using Fritz2 v0.8.
    b
    c
    12 replies · 3 participants
  • j

    Jacob Otto

    03/26/2021, 10:22 AM
    I want to get rid of any custom css in my fritz2 project, but could not find a way to do "transform: translate(-50%, 0%)" in the fritz2 styling universe. Is there a way to do that yet?
    b
    c
    8 replies · 3 participants
Powered by Linen
Title
j

Jacob Otto

03/26/2021, 10:22 AM
I want to get rid of any custom css in my fritz2 project, but could not find a way to do "transform: translate(-50%, 0%)" in the fritz2 styling universe. Is there a way to do that yet?
b

Big Chungus

03/26/2021, 10:24 AM
Have you tried css("your css as atring") builder?
👍 1
j

Jacob Otto

03/26/2021, 10:30 AM
Ah, works. That was not on my horizon. Thanks! 🙂 But now. How can I make it breakpoints dependend like the other position arguments?
position(
sm = { fixed {
  left { "50%" }
  *** I WANT TO HAVE IT HERE ***
} },
md = { fixed { left { none } } }
)
A got it, as easy as that:
css(sm = "transform: translate(-50%, 0%);", md = "transform: translate(0%, 0%);")
😀
👍 2
b

Big Chungus

03/26/2021, 10:58 AM
I wasn't aware of responsive option for that! I guess we both learned something new today 😄
Pro tip: use IntelliJ language injection to get css autocompletion in your css strings 😉
j

Jacob Otto

03/26/2021, 11:32 AM
Cool. 🙂 👍
c

Christian Hausknecht

03/29/2021, 8:38 AM
As CSS is a complex beast, we have no abstractions for rather complex stuff like animations and so on. So as you have figured out yourself, the universal ``css`` function comes to the rescue, which enables one to add native CSS code into our DSL. It is definitly out of our scope and capabilities to express all this stuff directly within our DSL. Currently our approach towards responsive design is to apply breakpoints within styling functions, so if you need to define different CSS aspects for different target devices, you have to define the behaviour within each CSS function. All our DSL functions should have an overloaded variant, that enables definitions for breakpoints. If you discover a function that does not support applying breakpoints yet, please file an issue! We have allready discussed, whether it would make sense to offer an alternative approach to group the breakpoints at the first level and define all the CSS functions on the second level in order to improve readability. This might be good for rather "symmetric" definitions, where every aspect is defined for each different breakpoint. To give you an imaginary example, of how this could look like:
// somehow within a styling context - NOT A WORKING EXAMPLE, just a sketch ;-)
sm {
    position { fixed { left { "50%" } } }
    css("transform: translate(-50%, 0%)")}
md {
    position { fixed { left { none } } }
    css("transform: translate(0%, 0%)")
}
On the other hand one might argue, that with the current approach you clearly can discover for each function separately, how it behaves for different breakpoints. But your solution is the currently supported one and quite useable imho.
b

Big Chungus

03/29/2021, 1:16 PM
I personally prefer breakpoints per definition (current approach) as it allows for selective universal definitions (applicable to all breakpoints). Also it's easier to follow, since all relevant breakpoint declarations get naturally grouped.
👍 1
View count: 1