From dev-return-2987-archive-asf-public=cust-asf.ponee.io@royale.apache.org Thu Feb 22 17:40:18 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E7D6418064E for ; Thu, 22 Feb 2018 17:40:16 +0100 (CET) Received: (qmail 11554 invoked by uid 500); 22 Feb 2018 16:40:15 -0000 Mailing-List: contact dev-help@royale.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@royale.apache.org Delivered-To: mailing list dev@royale.apache.org Received: (qmail 11537 invoked by uid 99); 22 Feb 2018 16:40:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Feb 2018 16:40:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id C7752C0145 for ; Thu, 22 Feb 2018 16:40:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.62 X-Spam-Level: **** X-Spam-Status: No, score=4.62 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, HTTP_ESCAPED_HOST=1.621, KAM_INFOUSMEBIZ=0.75, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7TwrNzKfp8Np for ; Thu, 22 Feb 2018 16:40:10 +0000 (UTC) Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 3814A5F1B3 for ; Thu, 22 Feb 2018 16:40:10 +0000 (UTC) Received: by mail-wr0-f169.google.com with SMTP id w77so11202208wrc.6 for ; Thu, 22 Feb 2018 08:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=rMfjpOYQkt/8d3/cnA+x0sV/u/kw2PRiKW+wZy8ma4k=; b=LWu6fmsI3lLejZiON3Il+z00aP5B8E1zDqlRCwa/WdqIYjnSSjUB4UGuihju2HNTsi ld7fZgXEYe31Tcw2ROnaJWB+eUJBJvM4Jxlu3QEklvlqbOF3Gj0lXqBt3AHshzukINku xX3iZ0I2VtS54ejSKRBk4xzHPC5/KkuVN2qLfTtP/7rTY9dDey1Kjh2af7s9nfPDoq39 oN0iOnhZFFmG4ejHyWcTsa6qc0ft/97QikWJdhKeQs41iAa1cDe2L4qcVtLtOwXn2BnY COKFpqykxfUpekcIBRpxsfmv5H2gpdmz2XdQFlFfTe0woj22v/Vf+Xg3ZoBpfcMHmMB/ FPpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=rMfjpOYQkt/8d3/cnA+x0sV/u/kw2PRiKW+wZy8ma4k=; b=iF79pO0UE1bEC07wn1659L2Ierq0DH9GEW8jv0tk1XifrlE/ldmLC9ivD5dYpemW9V 133fE6WDC+8W0bDnaiZnDQotEVJbwlenCO/7GuE4ML4F0RFyNyFpIrfNsz+xa5f4Vbk3 Dfr89JzIYNDhGhYjnp3wUMZh07CVzpCmZ8CS4X0WaVUMG6tWNNN4U4PGU09DBxUNxbNu uaH2G70ITs3J20xgFpuAhJY+/uY01nzcKPYWF4uMdid84qxR4qzCAoNYE/DmNqrxG/Hg 3b5ErACPqGr3+hByTkx8oJrcm0/UabLQXFsSkYPFRDTXXlDS+xwVQIpPQcGTQWIdZjF0 Xhbg== X-Gm-Message-State: APf1xPCRIrVmdlNBh6/+GciDVVjaYxr2xGAwYUAcTUE8/TcDLDoLBVaj 5loVW3dyDKU1L9fVce+ZLxJtjnjT1jFDtpIWKpBNXHL4 X-Google-Smtp-Source: AH8x227XPYtiBD7wgVHKXAa4vgrqsVWsRLHPkSn65GxAZN/iat3guZOSAmw7tHmTumXndQgzcYLVMe42e2vY0LBuris= X-Received: by 10.223.169.110 with SMTP id u101mr7366209wrc.31.1519317609055; Thu, 22 Feb 2018 08:40:09 -0800 (PST) MIME-Version: 1.0 Sender: carlos.rovira@gmail.com Received: by 10.223.192.4 with HTTP; Thu, 22 Feb 2018 08:39:48 -0800 (PST) In-Reply-To: References: From: Carlos Rovira Date: Thu, 22 Feb 2018 17:39:48 +0100 X-Google-Sender-Auth: EZaarZ28U-EC8CY91ud_HeAlbmw Message-ID: Subject: Re: Removing the * selector To: dev@royale.apache.org Content-Type: multipart/alternative; boundary="f403045cf0be638e740565cfb217" --f403045cf0be638e740565cfb217 Content-Type: text/plain; charset="UTF-8" Without know nothing about the solution I want to share a though: I think the implementation of all the things related to visuals (and css is one of them) is completely different in Royale to what it was in flex, so maybe we should not be worried that CSS is not following main flex rules. For me UX in royale must be done from scratch, if someone is migrating, we can only provide some basic *structure* similar to what Flex was. But that's only some kind of guide and could mean around 5-10% of what they must to migrate. So this is the opposite to things more related to "business" (like the ArrayCollection disscussion we made some days ago), in this case, there's very few to save from a flex codebase point of view, and CSS is one of the things I don't expect to reuse if I come from flex codebase. 2018-02-22 17:27 GMT+01:00 Alex Harui : > Well, it might be a migration issue in the sense that you could use a > selector called "global" in Flex and it would become the default value for > styles. > > Flex and Royale CSS has non-compliant CSS in it like "cffHinting" or > "focusSkin" in Flex or "IStatesImpl" in Royale. Non-compliant styles are > not emitted to the final .css file since the browser has no use for them, > but are kept in a data structure used by ValuesManager. If you use > "global" for non-compliant style properties, it will work in Royale like > it did in Flex, but if you use "global" to try to set the fontFamily to > Gothic everywhere in your app it will not work in Royale as it did in Flex. > > Until this change we renamed "global" in the final CSS to "*" so it would > have a more global effect, but I took that out because I'm not sure that > "*" is the equivalent since "*" actually has precedence over Type > Selectors. I'm not quite sure how to create the true equivalent of Flex > global styles. > > We could rename what I'm currently calling "global" in Royale to something > else like "royale" and go back to renaming "global" to "*", but I think > that will end up with complaints. I think it might be right for the > migration docs to mention this and offer alternatives like moving some > styles from global to "*" if they understand the impact of doing so. > Also, everything is currently a child of the Application so setting > Application styles should have a global effect, but I think both will > still override type selectors. > > My 2 cents, > -Alex > > On 2/22/18, 7:44 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira" > wrote: > > >Hi Andrew, this is new for Apache Royale since is how to deal with CSS and > >how browsers manage it. > >So maybe not much relation with Flex in this case > > > >Best > > > >Carlos > > > > > > > >2018-02-22 13:27 GMT+01:00 Andrew Wetmore : > > > >> Is this a migration issue for Flex apps, or is this specific to Royale? > >> > >> On Thu, Feb 22, 2018 at 5:29 AM, Alex Harui > >> wrote: > >> > >> > > >> > > >> > On 2/22/18, 1:12 AM, "carlos.rovira@gmail.com on behalf of Carlos > >> Rovira" > >> > wrote: > >> > > >> > >Hi Alex, > >> > > > >> > >I think this is a very good change since I had many problems with MDL > >> and > >> > >have to use the exclusion on CSS to make it work properly. > >> > > > >> > >If I understand ok, I should see fonts at 16px, that I think is > >>nowadays > >> > >the standard for "normal" text, so good. > >> > > > >> > >What I don't understand is what basic should making any change. From > >>my > >> > >point of view basic is as the name says...basic, and I don't like to > >> make > >> > >fonts 12px. > >> > >I only expect in basic to see the wiring of beads like views, models > >>and > >> > >controllers. But I think almost no CSS rules should be there, hence > >>the > >> > >basic point at the lowest level, where users only have the basics of > >> what > >> > >royale provides without any customization. > >> > > > >> > >That's how I see it > >> > > >> > I think I agree. That's sort of where I was heading by creating a > >> > separate theme in basic.css. Basic.css is separate from the > >>defaults.css > >> > in Basic.swc. Maybe we should give basic.css a different name. The > >>goal > >> > of basic.css was to give our examples and anybody else building the > >> > smallest app on Basic a more Flex-like look. I just don't think Serif > >> > 16px looks good. It is true that more traditional CSS visual styles > >>can > >> > be moved from the Basic defaults.css to whatever we call basic.css. > >> > Someone else can do that work once we see how this change affects > >>Vivid > >> > and other themes like MDL. I'm not sure if every component set should > >> > have a separate theme file or SWC as well. Or if there are a few > >>visual > >> > styles in that should remain in Basic's defaults.css so that other > >> > component sets don't have to repeat that information. > >> > > >> > -Alex > >> > > > >> > > > >> > >2018-02-22 2:43 GMT+01:00 Alex Harui : > >> > > > >> > >> Hi, > >> > >> > >> > >> Royale has been using the universal selector for a while now to set > >> > >> defaults for Royale apps. However, that caused problems with other > >> > >> third-party CSS. > >> > >> > >> > >> I just pushed changes to the compiler and framework so that we > >>don't > >> use > >> > >> the * selector. Instead we will be using the * selector properly > >>if > >> > >> provided by the users CSS and we are using a special selector > >>called > >> > >> "global" as the "browser defaults" and the final selector in the > >> lookup > >> > >>we > >> > >> manage. > >> > >> > >> > >> This should eliminate the need for other component sets to try to > >> > >>exclude > >> > >> the defaults.css from Basic. > >> > >> > >> > >> You may find that text that once looked nice now is 16px Serif. > >> That's > >> > >> because we are no longer using inheritance to set the font-family > >>on > >> all > >> > >> components. The browsers do not seem to deploy a default > >>font-family > >> so > >> > >> the SWF side shouldn't either. IOW, if you just put some plain > >>text > >> in > >> > >>an > >> > >> HTML file it shows up as 16px Serif. If you see 16px Serif, let us > >> know > >> > >> which component is showing that by default. > >> > >> > >> > >> However, we don't really want to make 16px Serif the default font > >>in > >> our > >> > >> examples, so I created a CSS-based theme in themes/Basic/basic.css > >>and > >> > >>put > >> > >> 12px Sans-Serif as the default for a bunch of type selectors since > >> that > >> > >> was what our examples were using. I did not create a default font > >>for > >> > >> Application as that would become the default for other component > >>sets > >> > >> mixed into a Royale app unless otherwise specified. Component sets > >> with > >> > >> different looks can use a different theme and get different > >>defaults. > >> > >> > >> > >> So, in sum, without any theme, we want the SWF side to look like > >>the > >> > >> browser and have 16px Serif. But the royale-config.xml will > >>specify > >> > >> themes/Basic/basic.css as the default theme giving the examples and > >> most > >> > >> people's unstyled apps a more Flex-like look by using sans-serif. > >> More > >> > >> type selectors may need to be added to themes/Basic/basic.css in > >>order > >> > >>to > >> > >> get sans serif everywhere by default without putting font-family on > >> > >> Application. That way, when you switch to another theme, like the > >> Vivid > >> > >> that Carlos is working on, there should be fewer, if any, default > >> values > >> > >> that screw up the other theme. > >> > >> > >> > >> Thanks, > >> > >> -Alex > >> > >> > >> > >> > >> > > > >> > > > >> > >-- > >> > >Carlos Rovira > >> > >https://na01.safelinks.protection.outlook.com/?url= > >> > http%3A%2F%2Fabout.me%2 > >> > >Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com% > >> > 7C5807444789504e2f3d8c08d5 > >> > >79d46f81%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0% > >> > 7C636548875665083262&s > >> > >data=MjSAbOXuFPTLeafKWOYuDDbc8oMn4YbsZ6pzwxYA6pg%3D&reserved=0 > >> > > >> > > >> > >> > >> -- > >> Andrew Wetmore > >> > >> > >>https://na01.safelinks.protection.outlook.com/?url= > http%3A%2F%2Fcottage14 > >>.blogspot.com%2F&data=02%7C01%7Caharui%40adobe.com% > 7Cc2d5d47c21084996345c > >>08d57a0b4647%7Cfa7b1b5a7b34438794aed2c178de > cee1%7C0%7C0%7C636549111204032 > >>767&sdata=5DOBst1ytHpKOuKlMicXtNr8AfJuWiEbXpk%2BmvUspLw%3D&reserved=0 > >> > > > > > > > >-- > >Carlos Rovira > >https://na01.safelinks.protection.outlook.com/?url= > http%3A%2F%2Fabout.me%2 > >Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com% > 7Cc2d5d47c21084996345c08d5 > >7a0b4647%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0% > 7C636549111204032767&s > >data=y64W72CO7WgyBNYCVAKpczGJaisl3vwuCu00%2FWx1sVA%3D&reserved=0 > > -- Carlos Rovira http://about.me/carlosrovira --f403045cf0be638e740565cfb217--