science and technology ประเภทของการ พนันบอล ของ เว็บ ยูฟ่า ที่น่าสนใจ By 5thirtyone.com Published On :: Sat, 13 Jan 2024 08:49:45 +0000 รูปแบบการ พนันบอล ของ เว็บufabet คัดสรรมาเพื่อนักพนันทุ […] The post ประเภทของการ พนันบอล ของ เว็บ ยูฟ่า ที่น่าสนใจ appeared first on 5thirtyone. Full Article ไม่มีหมวดหมู่
science and technology พื้นฐานของ การแทงบอลออนไลน์ ก้าวแรกสู่ความสำเร็จ By 5thirtyone.com Published On :: Sun, 14 Jan 2024 17:01:53 +0000 แนวทาง การแทงบอลออนไลน์ และวิธีการดูราคาสำหรับผู้เล่นมื […] The post พื้นฐานของ การแทงบอลออนไลน์ ก้าวแรกสู่ความสำเร็จ appeared first on 5thirtyone. Full Article ไม่มีหมวดหมู่
science and technology เทคนิคที่ช่วยให้การ แทงบอลออนไลน์ ได้เงินจริงง่ายยิ่งขึ้น By 5thirtyone.com Published On :: Mon, 15 Jan 2024 07:52:41 +0000 แทงบอลออนไลน์ อย่างถูกวิธี นำไปสู่ชัยชนะได้ไม่ยาก หากคุ […] The post เทคนิคที่ช่วยให้การ แทงบอลออนไลน์ ได้เงินจริงง่ายยิ่งขึ้น appeared first on 5thirtyone. Full Article ไม่มีหมวดหมู่
science and technology 面對中國軍事威脅 台灣打造「非紅」無人機產業 By www.bbc.com Published On :: Tue, 29 Oct 2024 06:13:49 GMT 2022年烏俄戰爭爆發後,執行「不對稱作戰」的無人機成為許多國家的重要戰略性產業。借鏡烏克蘭,同樣面對來自鄰國的軍事威脅、台灣政府找上民間廠商,2023年宣布,要在五年內向民間採購3000多架能被軍隊使用的商業無人機,標案預算超過56億元(約為 1.75億美元,13.05億人民幣)。 政府、民間、學校聯手,要讓台灣的無人機產業升級,最大的原因就是要排除中國製的關鍵零組件、打造「去中國化」的「非紅供應鏈」。而台灣政府投資上百億新台幣,能帶動台灣無人機產業,飛向國際嗎? 採訪:劉子維 拍攝、剪輯:張友慈 Full Article
science and technology TikTok創始人張一鳴成為新晉中國首富 七成上榜富豪資產縮水 By www.bbc.com Published On :: Wed, 30 Oct 2024 04:58:36 GMT 張一鳴是中國過去26年裡的第18位新晉首富。相較之下,美國祇有四位「首富」: 比爾蓋茲、華倫巴菲特、傑夫貝佐斯和伊隆馬斯克。 Full Article
science and technology 神舟十九號發射升空:中國最年輕航天員成功進入太空 By www.bbc.com Published On :: Wed, 30 Oct 2024 09:07:13 GMT 航天員乘組將把這個本土太空站作為基地使用,為期六個月,展開實驗並進行太空行走,北京正在為2030年將人類送上月球的最終任務收集經驗和情報。 Full Article
science and technology 中國跨國收養終結:希望破滅的300美國家庭和擔憂遭遺忘的被收養者 By www.bbc.com Published On :: Thu, 31 Oct 2024 09:33:16 GMT 中國自允許跨國收養32年來,一共有超過16萬名孤兒被收養。如今政府突然一刀切終止,隨着一個「時代的終結」,收養家庭、殘疾兒童以及被收養者受到怎樣的影響? Full Article
science and technology 「北上消費」後香港人再興「北上求醫」 背後的驚喜和無奈 By www.bbc.com Published On :: Fri, 01 Nov 2024 00:08:49 GMT 公立醫院排隊輪候時間長、私立醫院的收費昂貴,也是其中一個促使港人選擇到深圳求醫的誘因。 Full Article
science and technology 美國總統大選在即 美國華人投票意向是什麼? By www.bbc.com Published On :: Fri, 01 Nov 2024 13:04:34 GMT 2024美國總統大選即將在美國時間11月5日展開,BBC中文來到美國舊金山市和紐約市,了解在美華人對於兩位候選人的看法及投票意向。 Full Article
science and technology 中國關注美國大選:特朗普或賀錦麗勝選對北京意味著什麼 By www.bbc.com Published On :: Fri, 01 Nov 2024 15:42:41 GMT 2024 美國大選進入最後倒數,賀錦麗與特朗普的支持率不相上下,選舉結果將如何影響美中關係? Full Article
science and technology 美國大選:中國有偏好的候選人嗎?下任總統將如何影響中美貿易戰和台海局勢? By www.bbc.com Published On :: Fri, 01 Nov 2024 19:13:34 GMT 11月5日美國總統大選進入最後倒數階段,究竟賀錦麗或特朗普當選,將會如何影響中關係的走向?BBC中文綜合多名專家學者的分析,嘗試回應一些關鍵問題。 Full Article
science and technology 台灣民眾看美國大選:特朗普斥晶片產業被「偷走」賀錦麗未承諾協防 By www.bbc.com Published On :: Sat, 02 Nov 2024 02:21:15 GMT 美國總統大選將於當地時間2024年11月5日開始正式投票。早前,民主黨總統候選人賀錦麗和共和黨總統候選人特朗普均在公開場合被問及在台海問題上的立場。對此,BBC中文在台北街頭向當地民眾了解他們的看法。 Full Article
science and technology 美國大選:中美關係惡化下華裔科學家如履薄冰「不要再與中國有任何瓜葛」 By www.bbc.com Published On :: Sat, 02 Nov 2024 04:04:08 GMT 中美關係轉冷的背景下,一些美國華裔科學家擔心針對經濟間諜活動的「中國倡議計劃」在大選後復活。他們認為,這項計劃構成了種族定性,並對美國科學發展產生了破壞影響。 Full Article
science and technology 美國大選:第一代華人移民如何參政? By www.bbc.com Published On :: Mon, 04 Nov 2024 08:37:51 GMT 舊金山共和黨市長候選人李愛晨說:「現在我出來參選,有本地的人說我是『Chinese Spy』(中國間諜),但我回大陸的時候,又有人說我是美國回來的間諜。」 Full Article
science and technology 烏俄戰爭:台灣退役特種兵吳忠達陣亡 By www.bbc.com Published On :: Tue, 05 Nov 2024 02:15:54 GMT 繼台灣籍志願兵曾聖光於2022年在烏克蘭戰死沙場之後,又一位台灣籍士兵吳忠達於11月1日在烏東戰場上遭遇俄軍炮擊身亡,終年44歲。 Full Article
science and technology 金正恩是中國的盟友,但現在變成「地獄同志」 By www.bbc.com Published On :: Tue, 05 Nov 2024 08:54:47 GMT 中國希望與朝鮮建立高度控制的關係,但朝鮮與俄羅斯的關係可能會破壞這一點。如果習近平無法主導普京與金正恩的聯盟,以符合北京利益,那隨著西方的憤怒和焦慮加劇,中國很可能會陷入夾縫之中。 Full Article
science and technology 歐盟對中國電動車實施關稅 四個問題解答雙邊貿易戰可能性有幾何 By www.bbc.com Published On :: Tue, 05 Nov 2024 09:21:51 GMT 這場曠日持久的貿易爭端似乎落下帷幕,但專家們認為它的影響才剛剛開始,因為電動汽車產業以及中歐兩個經濟體都太重要了。中國希望借新能源汽車等領域的重大轉型升級,擺脫當前經濟困境;歐洲希望保住為數不多的優勢產業,不至於被中美拋下。 Full Article
science and technology BBC專訪杜琪峯導演:我和香港失去靈魂——人權與自由 By www.bbc.com Published On :: Tue, 05 Nov 2024 12:16:10 GMT 香港導演杜琪峯接受BBC中文專訪,談到香港電影人在當前政治氣候下如何堅持創作,表示「現在我和香港都失去靈魂」。他在訪談中透露構思《黑社會》第三集的心路歷程及仍未開拍的原委,探討香港創作自由、電檢紅線下的掣肘、海外「新港產片」出路以及兩岸華語影圈政治爭議。杜琪峯在金像獎和金馬獎皆三奪最佳導演,亦多次入圍國際電影大獎,是唯一在世界三大影展都曾任評審的香港導演。 Full Article
science and technology 中國新生兒數量逐年下降,產科迎來寒冬,醫生呼籲「救救產科」 By www.bbc.com Published On :: Fri, 08 Nov 2024 06:14:54 GMT 產科,作為迎接新生兒的第一站,是最早感受到人口結構變化的地方,也是最早承受人口結構變化帶來衝擊的地方。當下中國人口情勢嚴峻,以致多位醫師公開呼籲「救救產科」。 Full Article
science and technology 觀察:中國正在努力謀求經濟復甦,但特朗普可能會破壞這些計劃 By www.bbc.com Published On :: Fri, 08 Nov 2024 07:37:16 GMT 特朗普第一波關稅對中國來說是痛苦的,但中國現在處於更加脆弱的狀況。 Full Article
science and technology 中國推出10萬億天量化債計劃 寄望拯救地方政府及拉動需求 By www.bbc.com Published On :: Fri, 08 Nov 2024 10:44:33 GMT 2028年之前,中國地方政府需要消化的隱性債務總額有望從14.3萬億元大幅下降至2.3萬億元,大大減輕債務壓力。 Full Article
science and technology 特朗普強勢回歸: 為什麼有香港支持者「脫粉」或轉為「低調」關注? By www.bbc.com Published On :: Sun, 10 Nov 2024 08:13:02 GMT 「2024年香港人對美國大選討論少了,變成默默關注。」 Full Article
science and technology 鄭州大學生夜騎開封導致「封校」: 「跟疫情期間一樣」 By www.bbc.com Published On :: Tue, 12 Nov 2024 10:49:50 GMT 有大學教授斥責夜騎大學生為「酒囊飯袋」。參與大學生強調身處人群中的激動心情。11月8日晚鄭州大學生夜騎開封致使兩地交通堵塞,部分大學此後實行了「封校」。 Full Article
science and technology 中國珠海體育中心襲擊致35死 警察稱嫌犯對「離婚後財產分割結果不滿」 By www.bbc.com Published On :: Tue, 12 Nov 2024 16:04:34 GMT 據警察通報,中國廣東珠海市體育中心開車衝撞人群事件已造成35人死亡、43人受傷。中國國家主席習近平指示「依法嚴懲兇手」。 Full Article
science and technology 中國微短劇如何俘虜銀髮族的心?「狗血劇情」打造的百億產業 By www.bbc.com Published On :: Wed, 13 Nov 2024 00:00:40 GMT 今年以來,以中老年人為目標受眾的微短劇在中國互聯網市場上「井噴」,被專家視為潛在的千億市場,隨之而來的是「收割」長者錢包的爭議和關於老年人情感需求的議論。 Full Article
science and technology 珠海體育中心襲擊案後:被阻撓的記者和社交媒體上的熱議 By www.bbc.com Published On :: Wed, 13 Nov 2024 07:44:05 GMT 珠海襲擊案後,BBC記者的現場採訪遇阻,中國媒體表示早已收到禁令不允許報道相關案件,襲擊案相關貼文和影片也被逐個刪除。 Full Article
science and technology 南海爭端再起:菲律賓簽新法案與中國劃新基線,特朗普會繼續支持菲律賓嗎? By www.bbc.com Published On :: Wed, 13 Nov 2024 08:25:08 GMT 美國總統大選剛剛落幕,距離千裡之外的中國與菲律賓,在南海主權問題上再次掀起波瀾。特朗普會繼續支持菲律賓嗎? Full Article
science and technology Apple to roll out ‘Battery Intelligence’ for iPhone, Amazon slashes price of 43inch Hisense smart TV to £228 By www.techdigest.tv Published On :: Wed, 06 Nov 2024 12:13:13 +0000 The iPhone could finally show you how long it’ll take to finish charging. Code spotted in the second iOS 18.2 beta by 9to5Mac shows a new “BatteryIntelligence” feature that will let you […] The post Apple to roll out ‘Battery Intelligence’ for iPhone, Amazon slashes price of 43inch Hisense smart TV to £228 appeared first on Tech Digest. Related posts: Apple shares fall 3.3%, iOS18 with Apple Intelligence launches Apple to issue software update for overheating iPhone 15 AI could increase risk of cyber-attacks, Apple TV+ price rise (again) Full Article News Amazon kindle Battery Intelligence Elon Musk HiSense Joe Rogan
science and technology EV deliveries rise in October as overall market shrinks By www.techdigest.tv Published On :: Wed, 06 Nov 2024 14:21:10 +0000 New car market falls by -6.0% in October, as businesses, fleets and private buyers register 9,241 fewer vehicles. Battery electric the only vehicles to see higher uptake as manufacturers subsidise […] The post EV deliveries rise in October as overall market shrinks appeared first on Tech Digest. Related posts: October new car market grows 14% but EV growth stalls New car market grew 25.8% in June, but private EV sales stall Two straight years of growth for new car market, claims SMMT Full Article News Electric vehicles EV SMMT
science and technology Roblox introduces new safety features, Australia bans Under 16s from social media By www.techdigest.tv Published On :: Thu, 07 Nov 2024 12:35:38 +0000 Roblox is introducing new safety features for children under the age of 13, following criticism of how it protects younger users. The free online gaming platform, which has around 70 million […] The post Roblox introduces new safety features, Australia bans Under 16s from social media appeared first on Tech Digest. Related posts: UK ban on social media for under-16s? Naughty Dog cancels Last of Us game Online Safety Bill will make it easier for bereaved parents to access children’s social media Apple iOS 18.2 beta adds more AI features and ChatGPT integration, clear link between UK disorder and social media Full Article News Apple TV australia Roblox Virgin Media O2
science and technology Interview: Andrew Grill, Author of Digitally Curious By www.techdigest.tv Published On :: Thu, 07 Nov 2024 15:07:36 +0000 Last week we attended the launch of Andrew Grill’s latest book, Digitally Curious, held in conjunction with SAP Concur at the firm’s London office. In the book, the futurist, speaker, […] The post Interview: Andrew Grill, Author of Digitally Curious appeared first on Tech Digest. Related posts: Google’s quantum computing breakthrough 47 years quicker than supercomputer Elon Musk and Rishi Sunak in AI Summit interview, Twitter’s value falls to $19 billion Open AI boss Sam Altman joins Microsoft, electric Toyota Celica promised Full Article Artificial Intelligence Interview News Andrew Grill Digitally Curious quantum computing
science and technology Boycott Wordle – New York Times workers plead, DNA firm disappears without trace By www.techdigest.tv Published On :: Sun, 10 Nov 2024 15:44:59 +0000 ‘Don’t play Wordle’ is the plea from striking New York Times workers who are complaining about what they say are unfair labour practices. The New York Times Tech Guild, which […] The post Boycott Wordle – New York Times workers plead, DNA firm disappears without trace appeared first on Tech Digest. Related posts: Nearly half of workers now commuting to work 5 times a week Lotus Emeya, four-door hyper-GT, unveiled in New York Tech Digest daily roundup: Elon Musk’s brain chip firm Neuralink given go-ahead for human testing Full Article News amazon aol Atlas Biomed FTC Google Sony PS5 Wordle
science and technology Smart meters in north/south divide, Bitcoin breaks through $82,000 barrier By www.techdigest.tv Published On :: Mon, 11 Nov 2024 12:33:56 +0000 The way smart energy meters work in northern England and Scotland is causing issues for customers, BBC Panorama has been told. The body that represents energy companies, Energy UK, has […] The post Smart meters in north/south divide, Bitcoin breaks through $82,000 barrier appeared first on Tech Digest. Related posts: Polestar announces partnerships with Octopus and Ohme Apple ditches electric car project, Bitcoin hits $60,000 – first time since 2021 Bitcoin Uncovered: Currency of the Future Full Article News Asus Rog Phone 9 cryptocurrency Octopus Energy smart meters
science and technology Kia EV3 now available across Europe from £33,000 By www.techdigest.tv Published On :: Mon, 11 Nov 2024 14:56:42 +0000 Kia’s compact electric SUV, the Kia EV3, has arrived in Europe with a range of up to 375 miles on a single charge and an interior design that the […] The post Kia EV3 now available across Europe from £33,000 appeared first on Tech Digest. Related posts: Kia launch EV3 – a £30k electric car with 372-mile range Kia EV3 named Car of the Year in Electrifying.com awards Kia Charge now offers access to 80,000 EV chargers Full Article Electric Vehicles EV EV3 Kia
science and technology Blue Sky gets post-election boost, Apple Vision Pro headset production scaled back By www.techdigest.tv Published On :: Tue, 12 Nov 2024 12:22:00 +0000 Social media platform Bluesky says it has gained 700,000 new users in the week following the US election. Bluesky, which was originally conceived as part of Twitter by its former […] The post Blue Sky gets post-election boost, Apple Vision Pro headset production scaled back appeared first on Tech Digest. Related posts: US Senate approves TikTok ban, Apple ‘reduces Vision Pro production’ Tech Digest daily roundup: Apple announces $3499 Vision Pro headset Apple announces Vision Pro Headset launch date, Asus unveils smart glasses Full Article News 23 and me Apple Vision Pro Blue Sky donald trump M4 Mac Mini
science and technology AI university course uptake increased by 453% over 5 years, claims study By www.techdigest.tv Published On :: Tue, 12 Nov 2024 14:43:43 +0000 The development and rising popularity of AI is not only impacting the tech we use, but also the career paths the next generation are taking. A recent study by laptop and tech […] The post AI university course uptake increased by 453% over 5 years, claims study appeared first on Tech Digest. Related posts: Deepfakes could help in training videos, University of Bath study claims Used EV prices fall fuelling increased demand, claims Auto Trader Full Article Artificial Intelligence
science and technology How AI is Transforming User Experience (UX) By www.techdigest.tv Published On :: Tue, 12 Nov 2024 17:34:55 +0000 Artificial Intelligence (AI) is changing how user experience design is handled across various industries by playing a vital role in developing tailored and seamless experiences for users. Starting from app […] The post How AI is Transforming User Experience (UX) appeared first on Tech Digest. Related posts: The Next Big Thing in Tech: Transforming Everyday Tasks with Innovative Apps AI dominates 80% of top customer experience trends in 2024, data reveals How AI and Predictive Analytics Are Transforming the Gaming Landscape in Casinos Full Article Artificial Intelligence AI cybersecurity UX
science and technology Dao Day 2024 – a regression in the making By clagnut.com Published On :: Sun, 07 Apr 2024 13:49:09 PST It’s twenty four years to the day since A List Apart published John Allsopp’s seminal treatise A Dao of Web Design. It must be one of the most vital and cited articles ever to be written about web design. In it John quoted the Tao Te Ching as a way of persuading us web designers to be like The Sage and “accept the ebb and flow of things”. John compared the nature of print with the web: The fact we can control a paper page is really a limitation of that medium. You can think – we can fix the size of text – or you can think – the size of text is unalterable. You can think – the dimensions of a page can be controlled – or – the dimensions of a page can’t be altered. These are simply facts of the medium. And they aren’t necessarily good facts, especially for the reader. We should embrace the fact that the web doesn’t have the same constraints, and design for this flexibility. Those demands for flexibility led – 10 years later – to responsive web design as a best practice, and on to the present concept of fluid design. However we’re currently battling against another regression. As John himself wrote recently, “having escaped the gravity well of web pages being ’print, only onscreen’, they became ’apps, only in the browser’”. The better way of doing things will win out. Why? Because more people benefit from the accessible outcomes of fluid design, and it is coupled with a lower design and technical debt, even if the initial effort is higher. Meanwhile plus í§a change, plus c’est la míªme chose, or as the Lao Tse wrote 2,500 years ago “Well established hierarchies are not easily uprooted. So ritual enthrals generation after generation.” Read or add comments Full Article Web standards CSS techniques
science and technology A modern approach to browser support By clagnut.com Published On :: Tue, 04 Jun 2024 09:44:13 PST Just recently, some front-end code Clearleft delivered to a client was making its way through acceptance testing. We were slightly surprised to discover that their standards required our code to be supported by the two latest versions of web browsers. And then we realised we didn’t have a browser support policy of our own – something we set about rectifying. When considering browser versions, we were fairly sure our client didn’t mean, for example, versions 124 and 125 of Chrome (released on 16 April and 14 May 2024 respectively). Instead their support standard would most likely be harking back to the days when Internet Explorer was a thing, and major browsers were updated once a year at best. To put this in context, the final version of Internet Explorer shipped in 2013. It’s at this point we noted that Clearleft didn’t have a written browser support policy to counter or complement that of our clients. We probably did in the dim and distant past, but in recent years we’ve just built accessible, progressively enhanced websites without feeling the need to codify what that means. For the sake of professionalism and good client relationships, we decided to rectify that. But where to start? Using browser versions clearly doesn’t make any sense, so what do we turn to instead? As it turned out, Jeremy had already nailed it in a recent blog post. We wanted a browser support policy that would focus on outcomes for the user. Rather than being fixated on specific browsers, we needed to consider capabilities, using the mindset that sees modern coding use feature detection in preference to browser detection. It turns out there’s an initiative for that. The Baseline initiative is a joint effort by Google, Microsoft, Apple, and Mozilla to categorise browser support for web standards. Baseline provides clear information about which web standards features are ready to use in websites. It designates new features into two categories: Newly available – a feature is supported by the latest versions of all core browsers Widely available – a feature has been supported across browsers for at least 30 months We use the Baseline project to determine which browser features to use in production. If a feature is widely available according to Baseline, we can use it. Quoting directly from our browser support policy: Progressive enhancement If a feature is newly available, we might still use it, but we’ll ask a follow-up question: “Can this feature be used as a progressive enhancement?” In other words, will using this feature harm browsers that don’t support it? If a newly-available feature can be used as a progressive enhancement, we might well use it. If not, we’ll wait until the feature becomes widely available and choose a different method in the meantime. This approach restricts usage of new features to nice-to-have additions rather than mission-critical requirements. But it also means we don’t necessarily have to wait for every browser to support a feature before using it. Access for all Underlying our browser support policy are two foundational principles: Website content and core functionality should be accessible to everyone. It’s okay for websites to look different in different browsers. If content is unreadable in some browsers, that’s a bug that we will fix. If content is displayed slightly differently in some browsers, we consider that to be a facet of the web, not a bug. This means that there will sometimes be subtle visual and functional differences from browser to browser. We deem this acceptable provided that content and core functionality are unaffected. We think this the right approach to browser support, and it’s something we believe the whole industry should follow in principle. To that end we’ve made our browser support policy available under a Creative Commons license, meaning you can use it for your own purposes if you find it helpful. Originally published on the Clearleft blog. Read or add comments Full Article Web standards Browsers Clearleft
science and technology Use of ch unit considered inappropriate (in certain circumstances) By clagnut.com Published On :: Fri, 14 Jun 2024 09:09:14 PST Update: The title of this post was originally a knowing nod to the considered harmful cliché. I thought it might be amusing and get a bit of attention. However it was brought to my attention by a few people I respect that the title as written might be harmful in itself, so I changed it. However I believe that the subtle point I’m trying to make still stands: When did we start using the ch unit to specify the maximum length for a line of text? Many places you look nowadays you'll see a variation on: .prose { max-inline-size: 60ch; } Is it because of a direct reading of Bringhurst and people (like me) who’ve quoted him: Anything from 45 to 75 characters is widely regarded as a satisfactory length of line for a single-column page set in a serifed text face in a text size. The 66-character line (counting both letters and spaces) is widely regarded as ideal. For multiple column work, a better average is 40 to 50 characters. I get it: there’s all that talk of ’characters’. But that’s not what Bringhurst means literally. I’ll come back to that shortly. Firstly let’s remind ourselves about the CSS ch unit. While ch sounds like it should equate to a number of characters or a character width, that’s not strictly the case. The ch unit specifically refers to the width of the zero ’0’ character within the selected font, or 0.5em if no ’0’ is present. So unless you have a line made up entirely of zeroes, or are using a monospaced font, a width of 66ch will probably not give you a line containing 66 characters. What’s more, the rendered width of that line will vary with the font design, sometimes significantly. Two text blocks are set to 34 ch wide, but the use of a condensed font (top) and an expanded font (bottom) makes the rendered width narrower and wider respectively. The important part of Bringhurst’s guideline is not the ’66-characters’ but the ’satisfactory length’. This is about readability, and readability is affected by the length of a line more so than the number of characters in it. A consistent finding is that long line lengths on screen are least preferred or judged as least easy to read [my emphasis] With that in mind, restricting your line length using rem would be a far more appropriate unit to use: .prose { max-inline-size: 30rem; } This would give you a line length accessibly tied to text size, but independent of font design. But is using ch harmful? Bringhurst’s guideline includes this little caveat: a page set in a serifed text face in a text size. This enables him to equate the number of characters in a line with its length. So if you are using a fairly standard typeface for your text then you’ll probably be fine. However that ’standard typeface’ assumption is implicit anytime you use ch to set the width of a column of text. Using rem removes that assumption and gives you what you are probably really after – a consistent, predictable limit on line length. It didn’t surprise me to find that Eric Meyer had written about this six years ago. I’ll leave you with an important observation from his post: If you’re working with multiple typefaces, say one for headlines and another for body copy, be careful about setting ch measures and thinking they’ll be equivalent between the two fonts. The odds are very, very high they won’t be. So is using ch harmful? At the risk of saying it depends, it might not be harmful, but it could be, and there is a far more reliable and appropriate unit to use by way of the rem when it comes to limiting line length in a column of text. Read or add comments Full Article Typography CSS techniques
science and technology Introducing TODS – a typographic and OpenType default stylesheet By clagnut.com Published On :: Sun, 22 Sep 2024 18:04:33 PST Introducing TODS, an open source typography and opentype default stylesheet. One of the great things about going to conferences is the way it can spark an idea and kick start something. This project was initiated following a conversation with Roel Nieskens (of Wakamai Fondue fame) at CSS Day, where he demonstrated his Mildly Opinionated Prose Styles (MOPS). The idea is to set sensible typographic defaults for use on prose (a column of text), making particular use of the font features provided by OpenType. The main principle is that it can be used as starting point for all projects, so doesn’t include design-specific aspects such as font choice, type scale or layout (including how you might like to set the line-length). Within the styles is mildly opinionated best practice, which will help set suitable styles should you forget. This means you can also use the style sheet as a checklist, even if you don't want to implement it as-is. TODS uses OpenType features extensively and variable font axes where available. It makes full use of the cascade to set sensible defaults high up, with overrides applied further down. It also contains some handy utility classes. You can apply the TODS.css stylesheet in its entirety, as its full functionality relies on progressive enhancement within both browsers and fonts. Anything that is not supported will safely be ignored. The only possible exceptions to this are sub/superscripts and application of a grade axis in dark mode, as these are font-specific and could behave unexpectedly depending on the capability of the font. In order to preview some of the TODS features, you can check out the preview page tods.html and toggle TODS.css on and off. (This needs more work as the text is a bit of a mish-mash of examples and instructions, and it's missing some of the utility classes and dark mode. But that’s what open source is for… feel free to fork, improve and add back into the repo.) Walkthrough of the TODS.css stylesheet You can download a latest version of the stylesheet from the TODS Github repo (meaning some of the code may have changed a bit). Table of contents: Reset Web fonts Global defaults Block spacing Opentype utility classes Generic help classes Prose styling defaults Headings Superscripts and subscripts Tables and numbers Quotes Hyphenation Dark mode/inverted text 1. Reset Based on Andy Bell’s more modern CSS reset. Only the typographic rules in his reset are used here. You might like to apply the other rules too. html { -moz-text-size-adjust: none; -webkit-text-size-adjust: none; text-size-adjust: none; } Prevent font size inflation when rotating from portrait to landscape. The best explainer for this is by Kilian. He also explains why we still need those ugly prefixes too. body, h1, h2, h3, h4, h5, h6, address, p, hr, pre, blockquote, ol, ul, li, dl, dt, dd, figure, figcaption, div, table, caption, form, fieldset { margin: 0; } Remove default margins in favour of better control in authored CSS. input, button, textarea, select { font-family: inherit; font-size: inherit; } Inherit fonts for inputs and buttons. 2. Web fonts Use modern variable font syntax so that only supporting browsers get the variable font. Others will get generic fallbacks. @font-face { font-family: 'Literata'; src: url('/fonts/Literata-var.woff2') format('woff2') tech(variations), url('/fonts/Literata-var.woff2') format('woff2-variations'); font-weight: 1 1000; font-stretch: 50% 200%; font-style: normal; font-display: fallback; } Include full possible weight range to avoid unintended synthesis of variable fonts with a weight axis. Same applies to stretch range for variable fonts with a width axis. For main body fonts, use fallback for how the browser should behave while the webfont is loading. This gives the font an extremely small block period and a short swap period, providing the best chance for text to render. @font-face { font-family: 'Literata'; src: url('/fonts/Literata-Italic-var.woff2') format('woff2') tech(variations), url('/fonts/Literata-Italic-var.woff2') format('woff2-variations'); font-weight: 1 1000; font-stretch: 50% 200%; font-style: italic; font-display: swap; } For italics use swap for an extremely small block period and an infinite swap period. This means italics can be synthesised and swapped in once loaded. @font-face { font-family: 'Plex Sans'; src: url('/fonts/Plex-Sans-var.woff2') format('woff2') tech(variations), url('/fonts/Plex-Sans-var.woff2') format('woff2-variations'); font-weight: 1 1000; font-stretch: 50% 200%; font-style: normal; font-display: fallback; size-adjust:105%; /* make monospace fonts slightly bigger to match body text. Adjust to suit – you might need to make them smaller */ } When monospace fonts are used inline with text fonts, they often need tweaking to appear balanced in terms of size. Use size-adjust to do this without affecting reported font size and associated units such as em. 3. Global defaults Set some sensible defaults that can be used throughout the whole web page. Override these where you need to through the magic of the cascade. body { line-height: 1.5; text-decoration-skip-ink: auto; font-optical-sizing: auto; font-variant-ligatures: common-ligatures no-discretionary-ligatures no-historical-ligatures contextual; font-kerning: normal; } Set a nice legible line height that gets inherited. The font- properties are set to default CSS and OpenType settings, however they are still worth setting specifically just in case. button, input, label { line-height: 1.1; } Set shorter line heights on interactive elements. We’ll do the same for headings later on. 4. Block spacing Reinstate block margins we removed in the reset section. We’re setting consistent spacing based on font size on primary elements within ‘flow’ contexts. The entire ‘prose’ area is a flow context, but so might other parts of the page. For more details on the ‘flow’ utility see Andy Bell’s favourite three lines of CSS. .flow > * + * { margin-block-start: var(--flow-space, 1em); } Rule says that every direct sibling child element of .flow has margin-block-start added to it. The > combinator is added to prevent margins being added recursively. .prose { --flow-space: 1.5em; } Set generous spacing between primary block elements (in this case it’s the same as the line height). You could also choose a value from a fluid spacing scale, if you are going down the fluid typography route (recommended, but your milage may vary). See Utopia.fyi for more details and a fluid type tool. 5. OpenType utility classes .dlig { font-variant-ligatures: discretionary-ligatures; } .hlig { font-variant-ligatures: historical-ligatures; } .dlig.hlig { font-variant-ligatures: discretionary-ligatures historical-ligatures; } /* Apply both historic and discretionary */ .pnum { font-variant-numeric: proportional-nums; } .tnum { font-variant-numeric: tabular-nums; } .lnum { font-variant-numeric: lining-nums; } .onum { font-variant-numeric: oldstyle-nums; } .zero { font-variant-numeric: slashed-zero; } .pnum.zero { font-variant-numeric: proportional-nums slashed-zero; } /* Apply slashed zeroes to proportional numerals */ .tnum.zero { font-variant-numeric: tabular-nums slashed-zero; } .lnum.zero { font-variant-numeric: lining-nums slashed-zero; } .onum.zero { font-variant-numeric: oldstyle-nums slashed-zero; } .tnum.lnum.zero { font-variant-numeric: tabular-nums lining-nums slashed-zero; } .frac { font-variant-numeric: diagonal-fractions; } .afrc { font-variant-numeric: stacked-fractions; } .ordn { font-variant-numeric: ordinal; } .smcp { font-variant-caps: small-caps; } .c2sc { font-variant-caps: unicase; } .hist { font-variant-alternates: historical-forms; } Helper utilities matching on/off Opentype layout features available through high level CSS properties. @font-feature-values "Fancy Font Name" { /* match font-family webfont name */ /* All features are font-specific. */ @styleset { cursive: 1; swoopy: 7 16; } @character-variant { ampersand: 1; capital-q: 2; } @stylistic { two-story-g: 1; straight-y: 2; } @swash { swishy: 1; flowing: 2; wowzers: 3 } @ornaments { clover: 1; fleuron: 2; } @annotation { circled: 1; boxed: 2; } } Other Opentype features can have multiple glyphs, accessible via an index number defined in the font – these will be explained in documentation that came with your font. These vary between fonts, so you need to set up a new @font-font-features rule for each different font, ensuring the font name matches that of the font family. You then give each feature a custom name such as ‘swoopy’. Note that stylesets can be combined, which is why swoopy has a space-separated list of indices 7 16. /* Stylesets */ .ss01 { font-variant-alternates: styleset(cursive); } .ss02 { font-variant-alternates: styleset(swoopy); } /* Character variants */ .cv01 { font-variant-alternates: character-variant(ampersand); } .cv02 { font-variant-alternates: character-variant(capital-q); } /* Stylistic alternates */ .salt1 { font-variant-alternates: stylistic(two-story-g); } .salt2 { font-variant-alternates: stylistic(straight-y); } /* Swashes */ .swsh1 { font-variant-alternates: swash(swishy); } .swsh2 { font-variant-alternates: swash(flowing); } /* Ornaments */ .ornm1 { font-variant-alternates: ornaments(clover); } .ornm2 { font-variant-alternates: ornaments(fleuron); } /* Alternative numerals */ .nalt1 { font-variant-alternates: annotation(circled); } .nalt2 { font-variant-alternates: annotation(boxed); } Handy utility classes showing how to access the font feature values you set up earlier using the font-variant-alternates property. :root { --opentype-case: "case" off; --opentype-sinf: "sinf" off; } /* If class is applied, update custom property */ .case { --opentype-case: "case" on; } .sinf { --opentype-sinf: "sinf" on; } /* Apply current state of all custom properties, defaulting to off */ * { font-feature-settings: var(--opentype-case, "case" off), var(--opentype-sinf, "sinf" off); } Set custom properties for OpenType features only available through low level font-feature-settings. We need this approach because font-feature-settings does not inherit in the same way as font-variant. See Roel’s write-up, including how to apply the same methodology to custom variable font axes. 6. Generic helper classes Some utilities to help ensure best typographic practice. .centered { text-align: center; text-wrap: balance; } When centring text you’ll almost always want the text to be ‘balanced’, meaning roughly the same number of characters on each line. .uppercase { text-transform: uppercase; --opentype-case: "case" on; } When fully capitalising text, ensure punctuation designed to be used within caps is turned on where available, using the Opentype ‘case’ feature. .smallcaps { font-variant-caps: all-small-caps; font-variant-numeric: oldstyle-nums; } Transform both upper and lowercase letters to small caps, and use old style-numerals within runs of small caps so they match size-wise. 7. Prose styling defaults Assign a .prose class to your running text, that is to say an entire piece of prose such as the full text of an article or blog post. .prose { text-wrap: pretty; font-variant-numeric: oldstyle-nums proportional-nums; font-size-adjust: 0.507; } Firstly we get ourselves better widow/orphan control, aiming for blocks of text to not end with a line containing a word on its own. Also we use proportional old-style numerals in running text. Also adjust the size of fallback fonts to match the webfont to maintain legibility with fallback fonts and reduce visible reflowing. The font-size-adjust number is the aspect ratio of the webfont, which you can calculate using this tool. strong, b, th { font-weight: bold; font-size-adjust: 0.514; } Apply a different adjustment to elements which are typically emboldened by default, as bold weights often have a different aspect ratio – check for the different weights you may be using, including numeric semi-bolds (eg. 650). Headings are dealt with separately as the aspect ratio may be affected by optical sizing. 8. Headings h1, h2, h3, h4 { line-height: 1.1; font-size-adjust: 0.514; font-variant-numeric: lining-nums; } Set shorter line heights on your main headings. Set an aspect ratio for fallback fonts – check for different weights of headings. Use lining numerals in headings, especially when using Title Case. h1 { font-variant-ligatures: discretionary-ligatures; font-size-adjust: 0.521; } Turn on fancy ligatures for main headings. If the font has an optical sizing axis, you might need to adjust the aspect ratio accordingly. h1.uppercase { font-variant-caps: titling-caps; } When setting a heading in all caps, use titling capitals which are specially designed for setting caps at larger sizes. 9. Superscripts and subscripts Use proper super- and subscript characters. Apply to sub and sup elements as well as utility classes for when semantic sub/superscripts are not required. @supports ( font-variant-position: sub ) { sub, .sub { vertical-align: baseline; font-size: 100%; line-height: inherit; font-variant-position: sub; } } @supports ( font-variant-position: super ) { sup, .sup { vertical-align: baseline; font-size: 100%; line-height: inherit; font-variant-position: super; } } If font-variant-position is not specified, browsers will synthesise sub/superscripts, so we need to manually turn off the synthesis. This is the only way to use a font’s proper sub/sup glyphs, however it’s only safe to use this if you know your font has glyphs for all the characters you are sub/superscripting. If the font lacks those characters (most only have sub/superscript numbers, not letters), then only Firefox (correctly) synthesises sup and sub – all other browsers will display normal characters in the regular way as we turned the synthesis off. .chemical { --opentype-sinf: "sinf" on; } For chemical formulae like H2O, use scientific inferiors instead of sub. 10. Tables and numbers td, math, time[datetime*=":"] { font-variant-numeric: tabular-nums lining-nums slashed-zero; } Make sure all numbers in tables are lining tabular numerals, adding slashed zeroes for clarity. This could usefully apply where a time is specifically marked up, as well as in mathematics. 11. Quotes Use curly quotes and hang punctuation around blockquotes. :lang(en) > * { quotes: '“' '”' '‘' '’' ; } /* “Generic English ‘style’” */ :lang(en-GB) > * { quotes: '‘' '’' '“' '”'; } /* ‘British “style”’ */ :lang(fr) > * { quotes: '«?0202F' '?0202F»' '“' '”'; } /* « French “style” » */ Set punctuation order for inline quotes. Quotes are language-specific, so set a lang attribute on your HTML element or send the language via a server header. Note the narrow non-breaking spaces encoded in the French example. q::before { content: open-quote } q::after { content: close-quote } Insert quotes before and after q element content. .quoted, .quoted q { quotes: '“' '”' '‘' '’'; } Punctuation order for blockquotes, using a utility class to surround with double-quotes. .quoted p:first-of-type::before { content: open-quote; } .quoted p:last-of-type::after { content: close-quote; } Append quotes to the first and last paragraphs in the blockquote. .quoted p:first-of-type::before { margin-inline-start: -0.87ch; /* Adjust according to font */ } .quoted p { hanging-punctuation: first last; } @supports(hanging-punctuation: first last) { .quoted p:first-of-type::before { margin-inline-start: 0; } } Hang the punctuation outside of the blockquote. Firstly manually hang punctuation with a negative margin, then remove the manual intervention and use hanging-punctuation if supported. 12. Hyphenation Turn on hyphenation for prose. Language is required in order for the browser to use the correct hyphenation dictionary. .prose { -webkit-hyphens: auto; -webkit-hyphenate-limit-before: 4; -webkit-hyphenate-limit-after: 3; -webkit-hyphenate-limit-lines: 2; hyphens: auto; hyphenate-limit-chars: 7 4 3; hyphenate-limit-lines: 2; hyphenate-limit-zone: 8%; hyphenate-limit-last: always; } Include additional refinements to hyphenation. Respectively, these stop short words being hyphenated, prevent ladders of hyphens, and reduce overall hyphenation a bit. Safari uses legacy properties to achieve some of the same effects, hence the ugly prefixes and slightly different syntax. .prose pre, .prose code, .prose var, .prose samp, .prose kbd, .prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { -webkit-hyphens: manual; hyphens: manual; } Turn hyphens off for monospace and headings. 13. Dark mode/inverted text Reduce grade if available to prevent bloom of inverted type. :root { --vf-grad: 0; } @media (prefers-color-scheme: dark) { :root { --vf-grad: -50; } } * { font-variation-settings: "GRAD" var(--vf-grad, 0); } Not all fonts have a grade (GRAD) axis, and the grade number is font-specific. We’re using the customer property method because font-variation-settings provides low-level control meaning each subsequent use of the property completely overrides prior use – the values are not inherited or combined, unlike with font-variant for example. There are probably better ways of doing some of these things, and the preview page is rather lacking at the moment. Please let me know on Github, or better still fork it, edit and resubmit. Read or add comments Full Article Typography CSS techniques
science and technology The problem with superscripts and subscripts By clagnut.com Published On :: Wed, 25 Sep 2024 09:52:19 PST When marking up a web page featuring text that requires superscripts or subscripts, we should use the semantically meaningful <sup> and <sub> elements. Examples include footnote references(1) and simple maths 1210=C12. When browsers come across <sup> and <sub> elements, their user agent stylesheet usually applies rules like this: sub { vertical-align: sub; font-size: smaller; line-height: normal; } This makes the text smaller and shifts the baseline up or down. There’s two downsides to this. The first is that the baseline shift usually causes anomalous line spacing, that is to say lines are pushed up or down to make space for the sub- or superscript. Secondly the sub/superscripted characters look slightly off – effectively their font weight has been reduced compared with the surrounding text. Many OpenType fonts ship with properly designed sub- and superscripts. These are specifically designed for the purpose – the glyphs are already small (no change in font size required), retain a comparable weight and have a different shape compared with regular characters, as befits a thoughtfully shrunk down glyph. Even if these characters are available in the current font, browsers will ignore them and continue to synthesise using CSS properties. There are sensible reasons for this, as we shall see. It is very easy to get browsers to swap in the OpenType glyphs instead – just use the font-variant-position property. For browsers which support it (all modern ones) you can override the user agent stylesheet and implement font-variant-position as follows: @supports ( font-variant-position: sub ) { sub { vertical-align: baseline; font-size: 100%; line-height: inherit; font-variant-position: sub; } } But there’s a potential problem. What happens if the characters in the text you need to superscript are not all available as OpenType alternates in the current font? According to the CSS Fonts Module Level 4 specification, browsers should synthesise the whole superscript, even if some characters are available as proper superscripts: Because of the semantic nature of subscripts and superscripts, when the value [of font-variant-position] is either sub or super for a given contiguous run of text, if a variant glyph is not available for all the characters in the run, simulated glyphs should be synthesised for all characters using reduced forms of the glyphs that would be used without this feature applied. Phew. Job done. You’d have thought. Unfortunately at the time of writing only Firefox supports this behaviour; WebKit and Chromium do not. If the webfont has loaded, the font you are currently reading contains the following superscript alternates: 0123456789(). That is to say no letters or other characters except the numbers 0–9 and a pair of parentheses. Now let’s consider the following markup: 2a<sup>2</sup> a<sup>2a</sup> a<sup>(2)</sup> a<sup>(2a)</sup> a<sup>[2]</sup> The superscripts vary, in that some of them contain characters which are all available, and others contain a mixture. The text should render like this: Screenshot from Firefox 129b/Mac This is how it renders in the browser you are currently using: 2a2 a2a a(2) a(2a) a[2] As currently rendered in your browser The chances are that none of the ‘a’s or square brackets are superscripted at all. I’ve filed this as a bug in Chromium and Webkit. I’ve also asked that font-variant-position be removed from Baseline until these bugs are fixed, as support is evidently incomplete, but also because that lack of support is harmful to the visual semantics, in other words it could change the intention and meaning of the text. Finally I’ve proposed that full support for font-variant-position is included in Interop 2025. If you want to see this happen give my proposal some love. Read or add comments Full Article Web standards Browsers Typography CSS techniques
science and technology News roundup: deck.js, Yahoo Kills off Maps API, Patterns for Large-Scale JavaScript Application Architecture By www.jsmag.com Published On :: Listen to this week's podcast (September 9, 2011) Patterns For Large-Scale JavaScript Application Architecture Patterns For Large-Scale JavaScript Application Architecture is a lengthy article by Addy Osmani detailing some basic principles of writing a large-scale JavaScript application. It's inspired by a classic Nicholas Zakas talk outlining some of the same principles ... Full Article
science and technology News roundup: JavaScript under attack! By www.jsmag.com Published On :: Listen to this week's podcast (Podcast edit: I mistakenly mention Respond.js, which is actually a media query polyfill - I'm actually talking about Responsive images) Google Dart By far the biggest news of the week isn't JavaScript, but rather a language called Dart (formerly Dash?), which certain factions within Google hope will replace ... Full Article
science and technology News roundup: Node causes cancer, node cures cancer! By www.jsmag.com Published On :: This week's podcast (I was hoping to keep it short, but I kept talking and talking... sorry!) Libraries, frameworks, and code Cube - open-source visualization for time series data chainvas - chaining sugar for Canvas JS-Forth: Forth Interpreter in JavaScript when.js is a lightweight Promises and when() implementation (from CommonJS) MongoSpy is a MongoDB monitor that ... Full Article
science and technology News roundup: I Like Eich. 140 byte synthesizer, An End To Negativity, Sencha Touch 2.0, Dart (again) By www.jsmag.com Published On :: Listen to this week's podcast (October 29, 2011) (23:05 minutes) I'm trying a little something different this week. I hope you guys like pictures. :) Brenden Eich + "I Like Ike" mashup by @lonnen 140 byte synthesizer A while back Jed Schmidt created a simple little project on GitHub called 140 bytes ... Full Article
science and technology News roundup: 11-11-11! insertAdjacentHTML, classes in JavaScript?, twilight of Flash and Silverlight, Yahoo! Cocktails By www.jsmag.com Published On :: Listen to the podcast for November 11, 2011 insertAdjacentHTML Mozilla has a nice overview of insertAdjacentHTML, a DOM function that's intended to supplement innerHTML. It's a bit less destructive and plays nicely with content that's already in the DOM. For instance, whereas innerHTML completely blows away whatever is inside the ... Full Article