投稿時間:2021-06-09 23:45:32 RSSフィード2021-06-09 23:00 分まとめ(66件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 「iOS 15」ではApp Storeの検索結果でインストール済みアプリのスクリーンショットが非表示に https://taisy0.com/2021/06/09/141632.html apple 2021-06-09 13:53:09
IT 気になる、記になる… Microsoft、「Windows Sun Valley」に関するサポートページを誤って公開 − 「Windows 10」とは別のバージョンになる可能性も https://taisy0.com/2021/06/09/141625.html microsoft 2021-06-09 13:18:11
python Pythonタグが付けられた新着投稿 - Qiita 残プロ 第-8回 ~pythonで第N曜日を計算する~ https://qiita.com/R1nY1x1/items/3c73e98d8c3bf2e135ca 2021-06-09 22:58:35
python Pythonタグが付けられた新着投稿 - Qiita 目次 https://qiita.com/otoboke162/items/cb335f8e43cda4c7c9e0 2021-06-09 22:04:51
python Pythonタグが付けられた新着投稿 - Qiita カメラ起動+BGR取得 https://qiita.com/otoboke162/items/e5eebb6d1fdf4fdcf9cd 右上のxボタンは使えません四角い枠で囲むopencvcvrectangleを使用して四角い枠を表示する左上がXY左右がX方向上下がY方向サンプルコード四角い枠を表示importcvcapturecvVideoCapturecapturesetcvCAPPROPFRAMEWIDTH横幅capturesetcvCAPPROPFRAMEHEIGHT縦幅xsysxeyeY縦X横whileTrueretframecapturereadcolorBGRcvrectangleframexsysxeyecvimshowcamraframeifcvwaitKeyampxFFordqbreakcapturereleasecvdestroyAllWindows追加したコードcolorBGRcvrectangleframexsysxeye今回は使っていませんが自分でウィンドウの大きさを指定してあげることができるcapturesetcvCAPPROPFRAMEWIDTH横幅capturesetcvCAPPROPFRAMEHEIGHT縦幅retframecapturereadこのframeを使うコードY縦軸X横軸xsysxeyecolorBGRcvrectangleframexsysxeye以下説明cvrectangleは四角を表示するframe最初のフレームは上の赤文字のやつxsys開始地点を指定しますxeye終了地点を指定しますBGRの順番で指定する今回は白色なら赤色最後のは線の太さにした場合線ではなく指定した範囲全部塗りつぶしますの場合このように真っ白になるxsysスタートのsxeysエンドのeサンプルコード四角い枠を表示を実行下の白い線がしたのコードで表示されるcolorBGRcvrectangleframexsysxeyeこのように範囲を指定してあげればいいじゃん。 2021-06-09 22:01:18
js JavaScriptタグが付けられた新着投稿 - Qiita 【Vue.js】親・子のコンポーネント間でのv-modle https://qiita.com/yuta-katayama-23/items/9c556de924b184bcf2b3 どのようにしてvmodelが動作する流れを詳細に見ていくと、、、どこからスタートするかは鶏と卵であるが親コンポーネントのvaluevbindvalueの事であり、value属性を動的にバインドvalue属性の値に設定するするという事をする最初は空文字なので空文字がバインドされる子コンポーネントのpropsvalue親→子のコンポーネント間のデータ渡しの仕組みであるpropsを使い、親コンポーネントの属性名と同じ名前にする事で親コンポーネントの値を受け取る子コンポーネントのvaluevaluepropsで受け取った値をinputタグのvalue属性にvbindでバインドするこれにより親コンポーネントで定義していたeventDatatitleが子コンポーネントのinput要素に反映されるようになる子コンポーネントのinputemitinputeventtargetvalue子→親のコンポーネント間のデータ渡しの仕組みであるemitを用いて、inputに入力があった際に親コンポーネントのカスタムイベントを発火させる今回は親コンポーネントのinputを発火させたいので第一引数がinputになっており、emitで副次的に渡せる値としてはinputに入力された値を渡したいので、第二引数がeventtargetvalueになっている※eventtargetvalueのeventはDOMに備わっているイベントオブジェクトで、今回はinput要素への入力で発火したイベントオブジェクトが格納される子コンポーネントのinput親コンポーネントのinputeventDatatitleevent子コンポーネントからemitで発火されたイベントが親コンポーネントで発火し、eventDatatitleにeventemitを使っている場合はemitの第二引数に渡しているものが代入されるこれにより子コンポーネントの入力内容が親コンポーネントのオブジェクトに格納されるこのような流れで、親・子のコンポーネント間でのvmodelは実現される。 2021-06-09 22:54:24
js JavaScriptタグが付けられた新着投稿 - Qiita InDesign スクリプト 要素の内容を配置(指定された要素のテキストフレーム等を複製して構造の選択された属性の値のページに) https://qiita.com/kohakunekotarou/items/e1257db3e2534cf83247 InDesignスクリプト要素の内容を配置指定された要素のテキストフレーム等を複製して構造の選択された属性の値のページに指定された要素のテキストフレーム等を複製して構造の選択された属性の値のページに要素の内容を配置するスクリプトは、これで良いのかな・・・指定された要素のテキストフレーム等を複製して構造の選択された属性の値のページに要素の内容を配置更新アプリ指定targetindesignスクリプト名varscriptName要素の内容を配置指定された要素のテキストフレーム等を複製して構造の選択された属性の値のページにスクリプト動作指定一つのアンドゥ履歴にする及びアンドゥ名の指定appdoScriptfunctionダイアログvardialogueFlgconfirm構造の選択された属性の値のページに最後に選択された属性の要素のテキストフレーム等を複製して要素の内容をページの左上を原点にした位置に配置。 2021-06-09 22:17:09
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) wp メディアの画像が登録される度に画像が増えていくギャラリーページをつくりたい https://teratail.com/questions/343177?rss=all wpメディアの画像が登録される度に画像が増えていくギャラリーページをつくりたい前提・実現したいことWordPress管理画面の「メディア」に、画像が登録される度に画像が増えていくページネーション付きのギャラリーページをつくりたいです色々と調べてはみたのですがなかなか解決に至りませんでした。 2021-06-09 22:56:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 変数名の中に変わっていく変数(連番)を組み込む https://teratail.com/questions/343176?rss=all datalistnbspnbspinbspnbsp 2021-06-09 22:51:38
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 配列内の値を変更する方法 https://teratail.com/questions/343175?rss=all 配列内の値を変更する方法前提・実現したいこと初歩的な質問で大変恐縮です。 2021-06-09 22:50:34
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) EsriASCⅡデータから、緯度経度に対応するデータを正しく取得したい https://teratail.com/questions/343174?rss=all EsriASCⅡデータから、緯度経度に対応するデータを正しく取得したいEsriASCⅡファイルリンク先に保存した緯度経度に対応する値をpythonを使って正しく抽出したいと考えています。 2021-06-09 22:30:24
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) WooCommerceにて「属性」を返信メールにて付与したい https://teratail.com/questions/343173?rss=all WooCommerceにて「属性」を返信メールにて付与したい前提・実現したいこと質問失礼致します。 2021-06-09 22:29:38
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) wordpressでカテゴリー別のリンクが動作しない https://teratail.com/questions/343172?rss=all wordpressでカテゴリー別のリンクが動作しないご覧いただきありがとうございます。 2021-06-09 22:29:29
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) GNUアセンブリのコード解読 https://teratail.com/questions/343171?rss=all ascii 2021-06-09 22:23:49
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) JavaScript マウスの座標をpxから%の割り出し https://teratail.com/questions/343170?rss=all 2021-06-09 22:22:27
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 文字の漢字だけが太字になる https://teratail.com/questions/343169?rss=all 文字の漢字だけが太字になるWebフォントを読み込みして、拡張機能でも該当のフォントが出力されますがフォントがあたってない見た目になります。 2021-06-09 22:21:12
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Rで九九の表を作りたい https://teratail.com/questions/343168?rss=all 2021-06-09 22:19:31
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) PHP 1~50までの中から、3の倍数と3がつく文字を配列にいれて表示したい https://teratail.com/questions/343167?rss=all PHPまでの中から、の倍数とがつく文字を配列にいれて表示したい閲覧ありがとうございます。 2021-06-09 22:11:00
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【参考コードなし】安定的かつメンテナンス性に強い、データから表へ転記するマクロまたは関数 https://teratail.com/questions/343166?rss=all などなど…参考のコード例がなくて申し訳ありませんが、どのようなコードを書くのかで非常に悩んでいます。 2021-06-09 22:09:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) [Unity]自身のGmailを利用して、ユーザーからメッセージを受け取ろうとすると、Gmailから「ログインをブロックしました」と通知が来る。 https://teratail.com/questions/343165?rss=all ユーザーからメッセージを受け取るために、私のGmailアドレスを使って送信してもらう機能を実装したのですが、Gmailからは「ログインをブロックしました」と通知が来るだけで、ユーザーからのメッセージが届きません。 2021-06-09 22:09:22
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) swiperが動作しない https://teratail.com/questions/343164?rss=all swiperが動作しない聞きたいことswiperを導入したのですが、swiperが起動しませんのでわかる方いましたらアドバイスをいただきたいです。 2021-06-09 22:07:01
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) new RegExpを用いた完全一致の記述のやり方 https://teratail.com/questions/343163?rss=all newRegExpを用いた完全一致の記述のやり方前提・実現したいことjavascriptにて、与えられた文字列Pに当てはまる数字がいくつあるのか確かめるプログラムを作成しています。 2021-06-09 22:04:28
Linux Ubuntuタグが付けられた新着投稿 - Qiita ちょ、待てよ、、ちゃんとUbuntuじゃん https://qiita.com/chomateyo/items/d0633f40de03201e81b0 インスタンスの中身Ubuntuってどうなってるか見てみた見ないでGCP環境にてUbuntuイメージを選択した最小インスタンスを構築する。 2021-06-09 22:33:53
AWS AWSタグが付けられた新着投稿 - Qiita AWS IAMのグループ、ユーザーをTerraform で管理する https://qiita.com/fussy113/items/ab2365731169bea09aba 後々組織が大きくなったりすることによってAWSリソースを利用するメンバーが増えた時に、個別で設定するよりも楽に管理ができるようにするためです。 2021-06-09 22:29:42
GCP gcpタグが付けられた新着投稿 - Qiita ちょ、待てよ、、ちゃんとUbuntuじゃん https://qiita.com/chomateyo/items/d0633f40de03201e81b0 インスタンスの中身Ubuntuってどうなってるか見てみた見ないでGCP環境にてUbuntuイメージを選択した最小インスタンスを構築する。 2021-06-09 22:33:53
Azure Azureタグが付けられた新着投稿 - Qiita 【初心者】Azure Cognitive Services - Computer Vision を一通り使ってみる https://qiita.com/mksamba/items/ef3dcb32df9ee3f89fd4 以下のつの画像MS社によりチュートリアル用に一般公開されている画像に対し、ComputerVisionによる分析処理を実行し、結果を確認する。 2021-06-09 22:51:44
海外TECH Ars Technica Lordstown Motors warns its electric vehicle business may fail https://arstechnica.com/?p=1771710 future 2021-06-09 13:18:18
海外TECH Ars Technica RTX 3070 Ti review: Nvidia leaves the GPU fast lane (for now) https://arstechnica.com/?p=1771241 nvidia 2021-06-09 13:00:38
海外TECH DEV Community Exciting time ahead. I joined the Forem🌱 team https://dev.to/anujbhavsar96/exciting-time-ahead-i-joined-the-forem-team-25do Exciting time ahead I joined the ForemteamHello Everyone My name is Anuj Bhavsar based in Ahmedabad India And I m proud to announce that I have recently joined the Foremteam as a Product Designer I ll be working with lisasy amp pp designing the experience for empowering communities About meI m a computer science dropped out student competitive coding wasn t my cup of tea and then the creative field came to rescue I made my way into design industry five years back by self learning and the help of the online community I ve been working in this industry for the last four years Before Forem I ve worked with India s biggest Edtech startup Vedantu Also I ve experience working with a Design studio When I m not designing I enjoy binge watching series amp movies clicking amp editing pictures and watching cute animals on Instagram I m always grooving on some tunes on Spotifywhile working Nowadays I m into cooking workouts dog parenting and house decorations Why Forem Because why not Where will I find such a dream team dedicated to working towards such a noble and fascinating problem Being a self taught designer I know the importance of community DEV is such an incredible example of that And Forem is helping creators drive such communities The thing I like about Forem DEV is open source and the habit of building in public Transparency is everything in such time Excited to work with these talented folks and enhance the user experience for Forem Where you can find meFollow me here on DEV for work related updates Twitter •Instagram •Dribbble 2021-06-09 13:37:45
海外TECH DEV Community Looking for CSS wizards to contribute https://dev.to/przemek/looking-for-css-wizards-to-contribute-1d34 Looking for CSS wizards to contributeHi everyone I m co creator of the project that you might heard of already In short it is automated front end Studio that works in the browser and has it s own repository of fully customizable Widgets Live Preview meta framework and a much more You can read about it here One of the features that comes with the Studio are Widgets They can be inserted inside of any project within one click All of them have consistent naming when it comes to their styles which makes them easy to customize by either scoped CSS files or Global Styles Right now we are thinking of implementing the library with pre made Global Styles that can be inserted inside of the project within one click and give initial look to the app created by developer Unfortunately neither me or Chris are UI designers But that gives the great opportunity for our community The Studio is offered in FREEMIUM model So anyone can create their own project for FREE use as many of basic Widgets at the moment and style them use advantage of setup free Live Preview Implementation Assistant in context notification system that generate files and necessary glue code while triggered by an user and export code outside of the Studio to clean and well organized JSX powered by SolidJS And that s the deal We are looking for developers who would be interested in creating Global Styles for the Studio As a return we will offer months of freelancer plan for free That gives a great opportunity for everyone that is looking for alternative fast ways of delivering more competitive products to their customerslearners who would like to add to their CV portfolio new projectAlthough you can create projects from simple landing pages to advanced administration panels for absolutely FREE the Freelancer plan offers a couple of amazing features as automatically generated prerenders that allows to hit over score in well know tools measuring speed of websites lighthouse for example or access to repository with more advanced Widgets at the moment How it works You can clone repository from here and use it s README as a guideline what exactly needs to be styled Then you can access the Studio boilerplate that I prepared for you All the Widgets have consistent naming which makes styling of the whole app very fast smooth and easy When you finish with everything you can simply copy the CSS or export the project add it to cloned GitHub repository and commit changes What is worth to know Before you submit your work you can create your thumbnail and short README file where you can leave your name that will be visible for everyone before inserting your styles to their project Also remember that you don t need to style every single class that you find in the boilerplate If you will need help with anything you can use our group on FB where you can ask any questions related to GlueCodes Studio Just in case you missed it here is our website And the GitHub repository 2021-06-09 13:30:18
海外TECH DEV Community How to download node js on macOS https://dev.to/nerdclump7/how-to-download-node-js-on-macos-2ol6 How to download node js on macOSThis guide is for people who want help with how to download node js on macOS and you will know everything step by step This process will take about minute to install the node js file Node js is not a library or framework but in fact it s a runtime environment It helps programmers to write Server Side scripts with the help of javascript Node js is built on Chrome s V JavaScript engine Let s Get StartedRead all the steps to know how to download node js on macOSStep Go to Nodejs orgStep Click on the current version to download the latest version of the nodejs and it will automatically updates the node js And Download the File to continueStep Go to Finder and then Download tab to find node js package Then Double click on the file to install Step If you get this then follow the below steps as shown in image If you don t get it then skip to step to continue Step Open System PreferencesRead the Full Article here How to download node js on macOSThis Article is from Nerd ClumpNote All the images are from Nerd Clump 2021-06-09 13:24:07
海外TECH DEV Community Hexagons and Beyond: Responsive Grid Patterns, Sans Media Queries https://dev.to/afif/hexagons-and-beyond-responsive-grid-patterns-sans-media-queries-1nb4 Hexagons and Beyond Responsive Grid Patterns Sans Media QueriesSince the rise of Flexbox and CSS Grid everyone is claming the same float is dead stop using float but I m here to resurrect our old friend float to create complex and responsive layouts that you cannot achieve using flexbox and CSS grid All this without any single media query I know it s hard to believe So let s start with a working demo This is a fully responsive hexagon grid made without media queries JavaScript or a ton of hacky CSS Resize the demo screen and see the magic In addition to being responsive the grid also scales For example we can chuck more hexagons in there by adding more divs and control both the sizing and spacing using CSS variables Cool right And this is only one example among many grids we will build in the same manner This article is a generic version of a previous one where I only talked about hexagon shapes Making a grid of hexagonsFirst we create our hexagon shape This task is fairly easy using clip path We will consider a variable S that will define the dimension of our element Bennett Feely s Clippy is a great online generator for clip paths Each hexagon is an inline block element The markup can go something like this lt div class main gt lt div class container gt lt div gt lt div gt lt div gt lt div gt lt div gt lt div gt lt etc gt lt div gt lt div gt …and the CSS main display flex we will talk about this later s px size m px margin container font size disable white space between inline block element container div width var s margin var m height calc var s display inline block font size initial we reset the font size if we want to add some content clip path polygon Nothing complex so far We have a main element that holds a container which in turn holds the hexagons Since we are dealing with inline block we need to fight the common white space issue using the font size trick and we consider some margin defined with the variable M to control the space Here s the result so far Every other row needs some negative offset so the rows overlap rather than stack directly on top of each other That offset will be equal to of the element height see Figure We apply that offset to margin bottom to get the following container div width var s margin var m height calc var s display inline block font size initial clip path polygon margin bottom calc var m var s some negative margin to create overlap …and the result becomes Now the real trick is how we can shift the second row to get a perfect hexagon grid We ve already scrunched things to the point where the rows overlap each other vertically but what we need is to push every other row toward the right so the hexagons stagger rather than overlap Here s where float and shape outside come into play Did you wonder why we have a main element wrapping our container and having display flex That div is also a part of the trick In a previous article I used float and I needed that flexbox container in order to be able to use height I will be doing the same thing here container before content width calc var s var m float left height I am using the container before pseudo element to create a float element that take up all the height at the left of the grid and that has a width equal to half a hexagon plus its margin We get the following result Now we can reach for shape outside Let s take a quick refresher on what it does The shape outside CSS property defines a shapeーwhich may be non rectangularーaround which adjacent inline content should wrap By default inline content wraps around its margin box shape outside provides a way to customize this wrapping making it possible to wrap text around complex objects rather than simple boxes refNotice inline content in the definition This explains exactly why the hexagons need to be inline block elements But to understand what kind of shape we need let s zoom into the pattern What s cool about shape outside is that it actually works with gradients But what kind of gradient fits our situation If for example we have rows of hexagons we only need to shift means every even row Seen differently we need to shift every second row so we need a kind of repetition ー perfect for a repeating gradient We ll create a gradient with two colors A transparent one to create the “free space while allowing the first row to stay in place illustrated by the blue arrow above An opaque color to shift the second row to the right so the hexagons aren t directly stacked on top of one another illustrated by the green arrow Our shape outside value will look like this shape outside repeating linear gradient A B transparent Now let s find the value of A and B B will simply be equal to the height of two rows since our logic need to repeat each two rows The height of two rows is equal to the height of two hexagons including their margins minus twice the overlap Height M Height Height M Or expressed in CSS with calc calc var s var m That s a lot So let s hold all of this in a CSS custom property F The value of A defined by the blue arrow in the previous figure needs to be at least equal to the size of one hexagon but it can also be bigger In order to push the second row over to the right we need few pixel of opaque color so A can simply be equal to B Xpx where X is a small value We end up with something like this shape outside repeating linear gradient calc var f px var f And the following result See that Our repeating linear gradient s shape is pushing every other row to the right by one half the width of a hexagon to offset the pattern Let s put that all together main display flex s px size m px margin f calc var s var m px container font size disable white space between inline block element container div width var s margin var m height calc var s display inline block font size initial clip path polygon margin bottom calc var m var s container before content width calc var s var m float left height shape outside repeating linear gradient calc var f px var f That s it With no more than CSS declarations we have a responsive grid that fit nicely into all the screen sizes and we can easily adjust things by simply controling two variables You may have noticed that I am adding px to the variable F Since we are dealing with calculation that involve decimals the rounding may give us bad results To avoid this we add or remove few pixels I am also using instead of for the height of the floated element for similar reasons There is no particular logic with theses values we simply adjust them to make sure to cover most of the cases without any misaligning our shapes Want more shapes We can do more than hexagons with this approach Let s create a rhombus grid instead Again we start with our clip path to create the shape The code is basically the same What s changing are the calculations and values Find below a table that will illustrate the changes Hexagon gridRhombus gridheightcalc var s var s clip pathpolygon polygon margin bottomcalc var m var s calc var m var s fcalc var s var m calc var s var m And we re done A mere four changes to our code gets us a completely new grid but with a different shape Just how flexible is this We saw how we were able to make the hexagon and rhombus grids using the exact same code structure but different calculations Let me blow your mind with another idea What about making that calculation a variable so that we can easily switch between different grids without changing the code We can certainly do that We ll use an octagonal shape because it s more of a generic shape from that we can use to create other shapes a hexagon a rhombus a rectangle etc simply by changing a few values Our octagon is defined with four variables S the width R the ratio that will help us defines the height based on the width hc and vc both of these will control our clip path values and the shape we want to get hc will be based on the width while vc on the heightI know it looks hefty but the clip path is defined using eight points like shown in the figure Adding some CSS variables we get this clip path polygon var hc calc var hc points at the top var vc calc var vc points at the right calc var hc var hc points at the bottom calc var vc var vc points at the left This is what we re aiming for Let s zoom in to identify the different values The overlap between each row illustrated by the red arrow can be expressed using the vc variable which gives us a margin bottom equal to M vc where M is our margin In addition to the margin we applied between our element we also need an additional horizontal margin illustrated by the yellow arrow equal to S hc Let s define another variable for the horizontal margin MH that is equal to M S hc The height of two rows is equal to twice the size of a shape plus the margin minus twice the overlap or S M vc Let s update our table of values to see how we re calculating things between the different grids Hexagon gridRhombus gridOctagon gridheightcalc var s var s calc var s var r clip pathpolygon polygon polygon var hc calc var hc var vc calc var vc calc var hc var hc calc var vc var vc mh calc var m var s var hc marginvar m var m var m var mh margin bottomcalc var m var s calc var m var s calc var m var vc fcalc var s var m calc var s var m calc var s var m var vc Alright let s update our CSS with those adjustments main display flex s px size r ratio clip path parameter hc px vc px m px vertical margin mh calc var m var s var hc horizontal margin f calc var s var m var vc px container font size disable white space between inline block element container div width var s margin var m var mh height calc var s var r display inline block font size initial clip path polygon margin bottom calc var m var vc container before content width calc var s var mh float left height shape outside repeating linear gradient calc var f px var f As we can see the code structure is the same We simply added more variable to control the shape and extend the margin property And below a working example Adjust the different variables to control the shape while having a fully responsive grid An interactive demo you say You bet To make things easier I am expressing the vc and hc as percetange of the width and height so we can easily scale our elements without breaking the clip pathFrom the above we can easily get the initial hexagonal grid The rhombus grid And yet another hexagon grid A masonry like grid And a checkerboard while we are at it A lot of possibilities to create a responsive grid with any kind of shape All we have to do is adjust few variables Fixing the alignmentLet s try to control the alignment of our shapes Since we are dealing with inline block elements we re dealing with default left alignment and some empty space at the end depending on viewport width Notice that we alternate between two kind of grids based on the screen width Grid A different number of items per row N N N N etc Grid The same number of items per row N N N N etc It would be good to always have one of the grid all the time either or and center everything so that the free space is equally divided on both sides In order to get the first grid in the figure above the container width needs to be a multiplier of the size of one shape plus its margin or N S MH where N is an integer value This may sound impossible with CSS but it s indeed possible I made it using CSS grid main display grid grid template columns repeat auto fit calc var s var mh justify content center container grid column main is now a grid container Using grid template columns I define the column width as previously explained and use the auto fit value to get as many columns as possible into the available space Then the container spans all of the grid columns using  ー which means that the width of our container will be a mutiplier of one column size All it takes to center things is justify content center Yes CSS is magic Resize the demo and notice that not only do we have the first grid from the figure but everything is perfectly centered as well But wait we removed display flex and swapped in display grid…so how is the percentage based height of the float still working I had said that using a flex container was the key for that no Well turns out CSS grid sports that feature too From the specification Once the size of each grid area is thus established the grid items are laid out into their respective containing blocks The grid area s width and height are considered definite for this purpose Note Since formulas calculated using only definite sizes such as the stretch fit formula are also definite the size of a grid item which is stretched is also considered definite A grid item has a stretch alignment by default so its height is definite meaning using a percentage as a height inside it is perfectly valid Let s say we instead want the second grid in the figure ー we simply add an extra column with a width equal to half the width of the other columns main display grid grid template columns repeat auto fit calc var s var mh calc var s var mh justify content center Now in addition to a fully responsive grid that is flexible enough to take custom shapes everything is perfectly centred Wait one more a pyramidal gridLet s take everything we ve learned and build another amazing grid This time we ll transform the grid we just made into a pyramidal one Consider that unlike the grid we ve made so far the number of elements is important especially for the responsive part It s required to know the number of elements and more precesily the number of rows It doesn t mean we need a bunch of hardcoded values rather we use an extra variable to adjust things based on the number of rows The logic is based on the number of rows because different numbers of elements may give us the same number of rows For example there are five rows when we have between and elements even if the last row is not fully occupied Having between and elements gives us six rows and so on The number of rows is our new variable Before digging into the geometry and the math here is a working demo Notice that most of the code is the same as what we ve done in the previous examples So let s focus on the new properties that we ve added main nr number of rows container max width calc var nr var s var mh margin auto container before container i content width calc var mh var s float left height calc var f var nr shape outside linear gradient to bottom right container i float right shape outside linear gradient to bottom left NR is our variable for the number of rows The width of the container needs to be equal to the last row of the pyramid to make sure it hold all the elements If you check the previous figure you ll see that the number of the items contained in the last row is simply equal to the number of rows which means the formula is NR S MH You may have also noticed that we also added an lt i gt element in there We did that because we need two floating elements where we will apply shape outside To understand why we need two floating elements let s see what is done behind the scenes The blue elements are our floating elements Each one is having a width equal to half the container size minus half a shape size plus margin The height is equal to four rows in our case and to NR in a more generic case Earlier we defined the height of two rows F so the height of one row is F That s how we landed at height calc var f var nr Now that we have the size of our elements we need to apply a gradient to our shape outside The purple coloration in the figure above is the restricted area for our elements it need to be an opaque color The remaining area is the free space where the elements can flow it need to be a transparent color This can be done using a diagonal gradient shape outside linear gradient to bottom right We simply change right with left for the other floated element You have probably noticed that this is not responsive In fact go ahead and adjust the viewport width of the demo and see just how unresponsive this is We have a couple of options to get responsive We can fall back to the first grid when the container width is smaller than the viewport width It s a bit tricky to code but it allows us to preserve the same size for our elements We can reduce the size of our elements in order to keep the pyramidal grid This is easier to code using the percentage based value trick but that could result in super tiny elements on smaller screen sizes Let s go with the first solution We like a good challenge right To get the pyramidal grid we needed two floated element The initial grid needed just one floated element Luckily our structure allows us to have three floated elements without needing to add more elements to the markup thanks to pseudo elements We will use container before i before i after Same as before The initial grid container before content width calc var s var mh float left height shape outside repeating linear gradient calc var f px var f The pyramidal grid container i before container i after content width calc var mh var s float left height calc var f var nr shape outside linear gradient to bottom right container i after float right shape outside linear gradient to bottom left Now we need a trick that lets us use either the first floated element or the other two but not all of them at the same time This condition should be based on the width of our container If the container width is bigger than the width of the last row we can have our pyramid and use the floated elements inside of lt i gt If the container width is smaller than the width of the last row we switch to the other grid and use the first floated element We can use clamp for this It s sort of like a conditional function that sets a minimum and maximum range and within that range we provide it an ideal value to use between those points This way we can switch between grids using our formulas as clamped values and still avoid using media queries Our code will look like this main the other variables won t change lw calc var nr var s var mh width of last row container max width var lw The initial grid container before width clamp px var lw calc var s var mh The pyramidal grid container i before container i after width clamp px var lw px calc var mh var s On larger screens the width of the container LW is now equal to its max width so LW That means that the width of container before is equal to px and results in this floated element becoming disabled For the other floating elements we clamp the width width clamp px var lw px calc var mh var s …where the middle value LW px is equal to px px an intentionally large but arbitrary value It gets clamped to calc var mh var s In other words these floated elements are enabled with the correct width the one we defined previously Voilà we have a pyramidal shape on large screen Now when the container width get smaller LW is going to be greater than So LW will be positive Multiplied by a big value it s clamped to calc var s var mh which enables the first floated element For the other float elements LW px resolves to a negative value and is clamped to px which disables the float elements Resize the below demo and see how we switch between both gridsLet s try adding more elements See that Things are scaling perfectly We can also combine this with the CSS grid alignment trick we used earlier Do you think “float is such a bad thing now Want invert the pyramid Like illustrated with the above figure two changes to the previous code can invert our pyramid I change the direction of the gradient from to bottom left right to to top left right I add a margin top equal to the height of one row And hey we can swap between both pyramid easily Isn t this beautiful We have a responsive pyramidal grid with custom shapes that we can easily invert and that fallback to another responsive grid on small screen while everything is perfectly centred All this without a single media query or JavaScript but instead using the often overlooked float property You will probably notice some missalignment in some particular cases Yes it s again some rounding issue related to the calculation we are doing and the fact that we are trying to make this generic with the interactive demos To rectify this we simply adjust few values manually epsecially the percentage of the gradient until we get back a perfect alignment That s a float wrap There we have it combining float with shape outside can help us make complex flexible and responsive layouts ー long live float The article ends here but this is only the beginning I provided you with the layout and now you can easily put any content inside the divs apply a background shadows animations etc 2021-06-09 13:21:25
Apple AppleInsider - Frontpage News The bell is tolling for Intel Macs with the arrival of the first Apple Silicon specific features https://appleinsider.com/articles/21/06/09/the-bell-is-tolling-for-intel-macs-with-the-arrival-of-the-first-apple-silicon-specific-features?utm_medium=rss The bell is tolling for Intel Macs with the arrival of the first Apple Silicon specific featuresApple has said it will continue to support Intel Macs for years but many of the best new macOS Monterey features will only work on Apple Silicon And so they should The best of macOS Monterey will need an M processor or laterApple justifiably has a strong reputation for supporting older devices and much more so than other technology firms Tim Cook also publicly committed to supporting Intel based Macs even after the company has completed its transition to Apple Silicon ones Read more 2021-06-09 13:45:02
Apple AppleInsider - Frontpage News AMD announces W6600, W6800 PCI-E GPU compatible with Mac Pro, eGPU https://appleinsider.com/articles/21/06/09/amd-announces-w6600-w6800-pci-e-gpu-compatible-with-mac-pro-egpu?utm_medium=rss AMD announces W W PCI E GPU compatible with Mac Pro eGPUThe new Radeon Pro W graphics card is designed to be used in high powered workstations such as the Intel based Mac Pro AMD has unveiled its new AMD Radeon PRO W series workstation graphics PCI E GPU cards geared for professional use AMD says that the W line is most suitable for architectural design ultra high resolution media projects complex engineering simulations and intense video and image editing AMD s W series is built on nm based AMD RDNA architecture The company claims that it offers up to faster rendering than its previous generation when used with programs like SOLIDWORKS Visualize Read more 2021-06-09 13:24:39
Apple AppleInsider - Frontpage News How to opt out of Amazon Sidewalk internet sharing, and what you need to know https://appleinsider.com/articles/20/11/24/what-you-need-to-know-about-amazon-sidewalk?utm_medium=rss How to opt out of Amazon Sidewalk internet sharing and what you need to knowAmazon is rolling out its Amazon Sidewalk system to customers in the U S and by default you are opted in to its bandwidth sharing Here s what you should know and how to opt out of sharing your internet connection with your neighbors Credit AmazonFirst announced in September Sidewalk is a new idea and long term effort for extending the smart home to entire smart neighborhoods through the use of various local networking options Read more 2021-06-09 13:02:57
Apple AppleInsider - Frontpage News WWDC showcases Apple's Xcode 13, Xcode Cloud, TestFlight for Mac, SwiftUI https://appleinsider.com/articles/21/06/09/wwdc-showcases-apples-xcode-13-xcode-cloud-testflight-for-mac-swiftui?utm_medium=rss WWDC showcases Apple x s Xcode Xcode Cloud TestFlight for Mac SwiftUIApple s wide spectrum of developer tools are getting a series of major upgrades to help coders build better faster code more quickly in addition to providing collaborative features to help development teams work together more effectively The result more better apps for end users New Public APIsHistorically Apple has often released its own new OS and app features internally and then gradually opened up public access to third party developersーsometimes over the course of a number of years Read more 2021-06-09 13:20:00
Apple AppleInsider - Frontpage News Multitasking on iPad gets some polish with iPadOS 15 https://appleinsider.com/articles/21/06/08/multitasking-on-ipad-gets-some-polish-with-ipados-15?utm_medium=rss Multitasking on iPad gets some polish with iPadOS Announced at WWDC on Monday iPadOS brings notable new features to the device such as Quick Note and Live Text but multitasking remains largely unchanged Once Apple announced the new M iPad Pro at their Spring Loaded event it seemed like big changes were coming to iPadOS multitasking Some improvements were put on display during Monday s keynote but in day to day use the functionality is very similar to past iterations The majority of multitasking on iPadOS is still accomplished with a side by side app setup called Split View When a user has a full screen app open they are able to drag a second app from the Dock or Spotlight search to either side of the screen and have both visible simultaneously From there users can resize an app to take up one third of the screen or dismiss it entirely Read more 2021-06-09 13:07:17
海外TECH Engadget Watch the Battlefield reveal here at 10AM ET https://www.engadget.com/watch-battlefield-reveal-live-stream-133053423.html?src=rss_b2c introduction 2021-06-09 13:30:53
海外TECH Engadget Civilized Cycles' Model 1 is a posh, surprisingly practical e-bike https://www.engadget.com/civilized-cycles-model-1-posh-e-bike-first-ride-hands-on-130159771.html?src=rss_b2c Civilized Cycles x Model is a posh surprisingly practical e bikeFor many e bikes have become a fixture of life in New York City Couriers use them to zip between apartments bags of fragrant takeout in tow Tourists grab them from CitiBike stands to lazily loop around parks And more recently an uptick in sales has proven residents are embracing these easy rides as they contend with streets that still aren t quite as full as they used to be Point is we ve seen a lot of them cruising through the boroughs in the last year But none of them look like the Civilized Cycles Model 2021-06-09 13:01:59
海外TECH Engadget Motorola reveals yet another Moto G Stylus, this time with 5G https://www.engadget.com/motorola-moto-g-stylus-5g-400-dollars-130050486.html?src=rss_b2c Motorola reveals yet another Moto G Stylus this time with GWe weren t quite sure to make of Motorola s first Moto G Stylus way back in but the company was clearly onto something the subsequent model quickly became the best selling phone in its G series lineup Maybe that s why Motorola was so keen to announce yet another new Moto G Stylus today The new Moto G Stylus G will set you back when it goes on sale on June th and we went hands on to see if it has the chops to compete with a new wave of affordable G devices 2021-06-09 13:00:50
海外TECH Engadget NVIDIA RTX 3070 Ti review: A solid replacement for the 2070 Super https://www.engadget.com/nvidia-rtx-3070-ti-review-2070-super-replacement-130036224.html?src=rss_b2c nvidia 2021-06-09 13:00:36
海外TECH Engadget Asana adds video messaging because this meeting could've been an email https://www.engadget.com/asana-video-messaging-130036690.html?src=rss_b2c asynchronous 2021-06-09 13:00:36
海外TECH CodeProject Latest Articles Build a Teams Power App for Manufacturing 1: Get Started with Dataverse https://www.codeproject.com/Articles/5303169/Build-a-Teams-Power-App-for-Manufacturing-1-Get-St teams 2021-06-09 13:46:00
海外科学 NYT > Science Solar Eclipse at Sunrise: Where and When to Watch the 'Ring of Fire' https://www.nytimes.com/2021/06/09/science/solar-eclipse-june-10.html Solar Eclipse at Sunrise Where and When to Watch the x Ring of Fire x An annular eclipse will start in Canada and end in a remote part of Russia People in areas of the United States will see a partial eclipse 2021-06-09 13:19:41
海外科学 NYT > Science ¿Quieres ver el eclipse del ‘anillo de fuego’? Acá te explicamos todo lo que tienes que saber https://www.nytimes.com/es/2021/06/09/espanol/como-ver-eclipse-solar.html ¿Quieres ver el eclipse del anillo de fuego Acáte explicamos todo lo que tienes que saberEste eclipse anular solar comenzaráen Canadáy terminaráen una parte remota de Rusia En algunas regiones de Estados Unidos las personas solo verán un eclipse parcial 2021-06-09 13:09:31
ニュース @日本経済新聞 電子版 五輪・コロナ対策、強気の首相 2年ぶり党首討論 https://t.co/qAU3UNexD1 https://twitter.com/nikkei/statuses/1402622960783945736 党首討論 2021-06-09 13:45:47
ニュース @日本経済新聞 電子版 積水ハウスとマリオット・インターナショナルがホテル「フェアフィールド・バイ・マリオット和歌山すさみ」を開業。道の駅に隣接する宿泊特化型ホテルで、温浴施設の露天風呂などから海が一望できます。 https://t.co/A80tztVcsm https://twitter.com/nikkei/statuses/1402615189904756744 積水ハウスとマリオット・インターナショナルがホテル「フェアフィールド・バイ・マリオット和歌山すさみ」を開業。 2021-06-09 13:14:55
ニュース @日本経済新聞 電子版 シェルCEO、温暖化ガス「さらなる削減探る」 判決に https://t.co/Q9Sw4veBZ0 https://twitter.com/nikkei/statuses/1402611896901988352 温暖化 2021-06-09 13:01:50
ニュース BBC News - Home Halo Trust: Afghanistan mine clearance workers shot dead 'in cold blood' https://www.bbc.co.uk/news/world-asia-57410265 taliban 2021-06-09 13:14:08
ニュース BBC News - Home Wembley park stabbing deaths: Sisters killed in 'sacrificial deal' https://www.bbc.co.uk/news/uk-england-london-57377414 bibaa 2021-06-09 13:54:48
ニュース BBC News - Home European Super League breakaway clubs to be fined https://www.bbc.co.uk/sport/football/57414151 premier 2021-06-09 13:39:52
ニュース BBC News - Home Sweet dreams! Wandering elephants take a snooze https://www.bbc.co.uk/news/world-57416368 china 2021-06-09 13:07:46
ニュース BBC News - Home England have faced 'ugly truths' over offensive historical tweets - Root https://www.bbc.co.uk/sport/cricket/57415232 England have faced x ugly truths x over offensive historical tweets RootCaptain Joe Root says his side have faced up some ugly truths after a number of offensive historical tweets from England players were revealed 2021-06-09 13:46:07
ニュース BBC News - Home Defending champion Swiatek beaten by Sakkari in French Open quarters https://www.bbc.co.uk/sport/tennis/57413380 french 2021-06-09 13:36:18
LifeHuck ライフハッカー[日本版] PCとスマホの音声に同時接続&音量自動調整できるワイヤレスヘッドセット【今日のライフハックツール】 https://www.lifehacker.jp/2021/06/236147lht-steelseries.html 使用可能 2021-06-09 22:05:00
北海道 北海道新聞 スリランカ、日本にワクチン要請 60万回分提供で協議 https://www.hokkaido-np.co.jp/article/553747/ 日本政府 2021-06-09 22:17:00
北海道 北海道新聞 道内の感染減少傾向が続くか注視 専門家組織 https://www.hokkaido-np.co.jp/article/553745/ 厚生労働省 2021-06-09 22:15:00
北海道 北海道新聞 大阪、第5波へ3500床目指す 転退院円滑化へ調整組織も https://www.hokkaido-np.co.jp/article/553746/ 新型コロナウイルス 2021-06-09 22:15:00
北海道 北海道新聞 コンサドーレ3回戦へ スカイアースは敗れる サッカー天皇杯 https://www.hokkaido-np.co.jp/article/553743/ 全日本選手権 2021-06-09 22:13:00
北海道 北海道新聞 楽3―7中(9日) 中日が交流戦首位へ https://www.hokkaido-np.co.jp/article/553742/ 首位 2021-06-09 22:12:00
北海道 北海道新聞 NY円、109円前半 https://www.hokkaido-np.co.jp/article/553740/ 外国為替市場 2021-06-09 22:04:00
北海道 北海道新聞 日3―10神(9日) 加藤、今季最多の7失点で4敗目 https://www.hokkaido-np.co.jp/article/553739/ 日本ハム 2021-06-09 22:01:00
仮想通貨 BITPRESS(ビットプレス) [CoinDesk Japan] LINE、NFTマーケットを開始へ―国内8600万人ユーザーを取り込めるか https://bitpress.jp/count2/3_9_12559 coindeskjapanline 2021-06-09 22:50:11
仮想通貨 BITPRESS(ビットプレス) GMOコイン、6/9より販売所の最小注文数量および最小注文単位を変更 https://bitpress.jp/count2/3_10_12558 販売 2021-06-09 22:28:08
仮想通貨 BITPRESS(ビットプレス) コインチェック、紀里谷和明監督率いるKIRIYA PICTURESとNFT事業において連携を開始 https://bitpress.jp/count2/3_11_12557 kiriyapictures 2021-06-09 22:26:10
仮想通貨 BITPRESS(ビットプレス) ビットポイントジャパン、6/30まで「ビットコインがもらえる!取引キャンペーン」実施 https://bitpress.jp/count2/3_14_12556 取引 2021-06-09 22:23:53

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)